Installation
To whoever reads this, I hope you have a good time. I certainly did not trying to develop this mess of an application.
Prerequisites
To install docker-compose, you will need to have the following dependencies installed:
Clone the repository
For building the containers from scratch, the repository's packages are required.
git clone https://git.dergrimm.net/mentorenwahl/mentorenwahl.git
cd mentorenwahl/
After that you will need to create an environment configuration file.
cp .example.env .env
Build the containers
Building the project is as simple as invoking the make
command
according to following options:
# Production build
make prod
# Development build
make dev
Run the containers
Running the containers is done with docker-compose
:
# TTY attached
docker-compose up
# TTY detached
docker-compose up -d
Configuration
Environment variables
To change the environment variables edit the .env
file.
Name | Type | Description |
---|---|---|
URL | String | The webroot of the application to base of links and routing |
POSTGRES_USER | String | Database user name |
POSTGRES_PASSWORD | String | Database password |
BACKEND_URL | String | Backend webroot (= URL ) |
BACKEND_API_GRAPHQL_PLAYGROUND | Bool | Enables GraphQL playground (automatically enabled when compiled in development mode) |
BACKEND_API_JWT_SECRET | String | Password to encrypt all authentication tokens with |
BACKEND_API_JWT_EXPIRATION | Int | Expiration time of authentication tokens in minutes |
Compile time
Backend
Setting the development
flag with -Ddevelopment
flag on compiling the backend will result in being able to debug the API endpoints at /graphql?development=true
. Also automatically enables the GraphQL playground at /graphql
.
Development
For development, you will need: