To make the project work, you need to create .env files.
Copy .env.example into:
- root
.env agent/.envcore/.env
In agent/.env and core/.env keep only this line:
DATABASE_URL=...This is used by SQLx migrations and database connection.
The root .env contains all application configuration except database settings, for example:
- logging
- environment (dev/prod)
- ports defaults
- general runtime settings
- Service
.env-> onlyDATABASE_URL - Root
.env-> all other configuration
docker compose up -dRun migrations from the service directory.
For agent:
cd agent
sqlx migrate run --source migrationsFor core:
cd core
sqlx migrate run --source migrationscargo run -p agent
cargo run -p coreFirst cert
openssl s_client \
-connect 127.0.0.1:6969 \
-cert certs/dev/client.crt \
-key certs/dev/client.key \
-CAfile certs/dev/ca.crtSecond cert
openssl s_client \
-connect 127.0.0.1:6969 \
-CAfile certs/dev/ca.crt \
-cert certs/dev/client2.crt \
-key certs/dev/client2.key