In order to run Spaced in development the following must be installed.
Install dependencies for web-frontend.
npm iThe project requires at least a PostgreSQL database to be run and uses RabbitMQ as message broker. Both can be started using docker compose.
docker compose up -dSet the development database url and JWT secret.
echo DATABASE_URL=postgres://admin:password@localhost:5432/spaced > .env
echo JWT_SECRET=test >> .envThe services can be started with the following script.
npm run servicesAnother option is to use cargo watch.
Note: You may need to run
cargo install cargo-watch.
The web-frontend can be started with the following script.
npm run devThe web-frontend can also be displayed from a desktop application with the following command.
npm run tauri devThe web-frontend can be built using the following script.
npm run buildThe docker images for each service can be built using the following command.
docker buildx bakeUse the following environment variable to change the image tag.
IMAGE_TAG=1.0 docker buildx bake # result = spaced/<service_name>:1.0Use the following environment variable to change the distroless image tag. The default is nonroot to debug with a shell use debug or debug-nonroot.
DISTROLESS_TAG=debug docker buildx bakeThe docker-compose.yaml file is used as build definition. docker buildx bake ignores profiles and builds the services anway.
Please read the contributing guidelines.