Backend for a digital kitty.
Secrets are stored in .secret
files in the secrets
directory and excluded from git.
Configuration of the default admin and the secret string used by the HMAC algorithm for JWT verification and signing.
ID=koffee-admin-id
NAME=koffee-admin-name
PASSWORD=koffee-admin-password
HMAC_SECRET=yoursecretstring
- Build the project using the Gradle
build
task. - Create the required secret.
- Change the
URL
environment variable in./environments/domain.env
as necessary. - Run
docker-compose up --build -d
. - The server is now accessible at
http://localhost:8080
. - Run
docker-compose down
to stop the server.
- Build the project using the Gradle
build
task. - Create the required secret.
- Change the
URL
environment variable in./environments/domain.env
to a valid domain pointing to the host machine. - Ensure that ports 80 and 443 are forwarded to the host machine.
- Run
docker-compose -f docker-compose-production.yml up --build -d
. - The server is now accessible at
https://your.domain/koffee
. - Run
docker-compose -f docker-compose-production.yml down
to stop the server.
The entire database can be dumped and restored using the following commands.
Note: The parameter koffee-database
needs to be changed if the name of the database has been modified in koffee.env
.
Backup: docker-compose exec -T mongo mongodump --archive --gzip --db koffee-database > dump.gz
Restore: docker-compose exec -T mongo mongorestore --archive --gzip < dump.gz
The following sections describe the schemas used by the MongoDB.