Control plane for managing circuless remote data infrastructures
Python installed if you plan to run locally
Docker and docker compose
Production: POSTGRES, APISIX*, ETCD*
Development: (Testing whole stack) POSTGRES, APISIX*, ETCD*, ZIPKIN, FLUENT-BIT
- APISIX not enabled in v0.0.1
-
Copy environments/.env.docker in the root folder (Update if needed)
-
Add your certificate.pem at the root folder. Obtain with support from bAvenir. (Without it you can start in development mode only)
-
Build the application: docker compose up -d --build
-
Initialize DB:
Run 'docker ps' and get container ID of circuless-node. In the example output from docker ps below, take e2a1564620f7.
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
e2a1564620f7 circuless-node-control-plane-app "uvicorn main:app --…" About a minute ago Up About a minute (healthy) 0.0.0.0:8000->8000/tcp, [::]:8000->8000/tcp circuless-node
Run docker exec -it CONTAINER_ID python init_db.py
- DONE
- Install python environment
python -m venv .venv source .venv/bin/activate
-
Install libraries Install from requirements.txt
-
Copy environment settings
Copy environments/.env.local to root
- Init dB
Run python src/init_db.py
- Start fastapi run src/main.py --port 3000
Using SQLAlchemy and alembic
Inside folder sources
python init_db.py
alembic revision --autogenerate -m "What changed in the table"
alembic upgrade head
alembic downgrade -1
alembic current
alembic history --verbose