In order to launch the database and the server, you need to provide the following environment variables in a .env
file (see the sample file):
SERVER_PORT
: The port the server will listen toPOSTGRES_DB
: The name of the postgres databasePOSTGRES_USER
: The name of the postgres userPOSTGRES_PASSWORD
: The database's passwordDATABASE_IP
: The database's ip addressDATABASE_PORT
: The database's portJWT_SECRET
: The secret key for the server's jwtTESTS_PORT
: To run the unit testsMIGRATION_PORT
: The port used for database migrationsSES_REGION
: The region configured for the AWS SESSES_ACCESS_KEY
: The access key for the AWS SESSES_SECRET_ACCESS_KEY
: The secret access key for the AWS SESSES_FROM_ADDRESS
: The email address that will be used to send emailsAPI_URL
: An url pointing to the server hostWEBSITE_URL
: An url pointing to the websiteMATHS_KEY
: The key for the mathematics library authentication
Once you provided the required environment variables, you can launch the database by running:
docker-compose up --build database
To set up or update the database, you might need to run migrations
docker-compose up --build migration-run
You can revert the migration by running:
docker-compose up migration-revert
Once you provided the required environment variables and started the database, you can launch the development server by running:
docker-compose up --build server-dev
Run the following command:
docker-compose up --build server-prod
Once the database and the server are launched, it is possible to fill the database with armies data.
Follow the instructions, and run the following command:
docker-compose up --build script_armies-data
You can find the API documentation on swagger or in the repository's documentation.
You can find the database's documentation here.
To report a bug or request a new feature, create a new issue here and use the correct template.
Before submitting an issue, please check that someone did not report a similar one.