2022-02-13 18:12:44 +00:00
|
|
|
# Mentorenwahl: A fullstack application for assigning mentors to students based on their whishes.
|
|
|
|
# Copyright (C) 2022 Dominic Grimm
|
|
|
|
|
|
|
|
# This program is free software: you can redistribute it and/or modify
|
|
|
|
# it under the terms of the GNU General Public License as published by
|
|
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
|
|
# (at your option) any later version.
|
|
|
|
|
|
|
|
# This program is distributed in the hope that it will be useful,
|
|
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
# GNU General Public License for more details.
|
|
|
|
|
|
|
|
# You should have received a copy of the GNU General Public License
|
|
|
|
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
|
|
|
|
2022-02-05 13:31:35 +00:00
|
|
|
version: "3"
|
|
|
|
|
2022-01-08 12:29:22 +00:00
|
|
|
services:
|
|
|
|
nginx:
|
2022-01-10 12:50:42 +00:00
|
|
|
image: nginx:alpine
|
2022-01-23 08:12:57 +00:00
|
|
|
container_name: nginx
|
|
|
|
restart: always
|
2022-01-08 12:29:22 +00:00
|
|
|
volumes:
|
|
|
|
- ./config/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
|
|
|
|
ports:
|
|
|
|
- 80:80
|
|
|
|
depends_on:
|
2022-01-23 08:12:57 +00:00
|
|
|
- adminer
|
|
|
|
- backend
|
2022-01-29 15:40:39 +00:00
|
|
|
- frontend
|
2022-01-08 12:29:22 +00:00
|
|
|
|
|
|
|
db:
|
2022-01-10 12:50:42 +00:00
|
|
|
image: postgres:alpine
|
2022-01-08 12:29:22 +00:00
|
|
|
container_name: db
|
2022-01-23 08:12:57 +00:00
|
|
|
restart: always
|
|
|
|
networks:
|
|
|
|
- db
|
2022-01-08 12:29:22 +00:00
|
|
|
environment:
|
|
|
|
POSTGRES_USER: ${POSTGRES_USER}
|
|
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
|
|
|
volumes:
|
|
|
|
- db:/var/lib/postgresql/data
|
|
|
|
|
|
|
|
adminer:
|
2022-01-10 12:50:42 +00:00
|
|
|
image: adminer:standalone
|
2022-01-08 12:29:22 +00:00
|
|
|
container_name: adminer
|
2022-01-23 08:12:57 +00:00
|
|
|
restart: always
|
|
|
|
networks:
|
|
|
|
- default
|
|
|
|
- db
|
2022-01-08 12:29:22 +00:00
|
|
|
depends_on:
|
|
|
|
- db
|
|
|
|
|
2022-01-23 08:12:57 +00:00
|
|
|
redis:
|
|
|
|
image: redis:alpine
|
|
|
|
container_name: redis
|
|
|
|
restart: always
|
|
|
|
networks:
|
|
|
|
- redis
|
|
|
|
volumes:
|
|
|
|
- redis:/data
|
|
|
|
|
|
|
|
backend:
|
2022-01-08 12:29:22 +00:00
|
|
|
build:
|
2022-01-23 08:12:57 +00:00
|
|
|
context: ./docker/backend
|
2022-01-08 12:29:22 +00:00
|
|
|
args:
|
|
|
|
BUILD_ENV: production
|
2022-01-23 08:12:57 +00:00
|
|
|
container_name: backend
|
|
|
|
restart: always
|
|
|
|
networks:
|
|
|
|
- default
|
|
|
|
- db
|
|
|
|
- redis
|
2022-02-02 14:38:36 +00:00
|
|
|
depends_on:
|
|
|
|
- db
|
|
|
|
- redis
|
2022-01-08 12:29:22 +00:00
|
|
|
environment:
|
2022-02-03 16:28:32 +00:00
|
|
|
BACKEND_URL: ${URL}
|
|
|
|
BACKEND_API_GRAPHQL_PLAYGROUND: ${BACKEND_API_GRAPHQL_PLAYGROUND}
|
2022-02-06 20:12:38 +00:00
|
|
|
BACKEND_API_JWT_SECRET: ${BACKEND_API_JWT_SECRET}
|
2022-01-23 08:12:57 +00:00
|
|
|
BACKEND_WORKER_REDIS_URL: redis://redis:6379
|
2022-01-28 17:30:20 +00:00
|
|
|
BACKEND_SMTP_HELO: ${BACKEND_SMTP_HELO}
|
2022-02-05 13:31:35 +00:00
|
|
|
BACKEND_SMTP_HOST: ${BACKEND_SMTP_HOST}
|
2022-01-28 17:30:20 +00:00
|
|
|
BACKEND_SMTP_PORT: ${BACKEND_SMTP_PORT}
|
|
|
|
BACKEND_SMTP_NAME: ${BACKEND_SMTP_NAME}
|
|
|
|
BACKEND_SMTP_USERNAME: ${BACKEND_SMTP_USERNAME}
|
|
|
|
BACKEND_SMTP_PASSWORD: ${BACKEND_SMTP_PASSWORD}
|
2022-02-03 16:28:32 +00:00
|
|
|
BACKEND_DB_URL: postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_USER}
|
2022-02-05 13:31:35 +00:00
|
|
|
BACKEND_LDAP_HOST: ${BACKEND_LDAP_HOST}
|
|
|
|
BACKEND_LDAP_PORT: ${BACKEND_LDAP_PORT}
|
|
|
|
BACKEND_LDAP_BASE_DN: ${BACKEND_LDAP_BASE_DN}
|
2022-02-07 17:52:17 +00:00
|
|
|
BACKEND_LDAP_BASE_USER_DN: ${BACKEND_LDAP_BASE_USER_DN}
|
2022-02-06 15:42:08 +00:00
|
|
|
BACKEND_LDAP_BIND_DN: ${BACKEND_LDAP_BIND_DN}
|
|
|
|
BACKEND_LDAP_BIND_PASSWORD: ${BACKEND_LDAP_BIND_PASSWORD}
|
2022-01-23 08:12:57 +00:00
|
|
|
|
2022-01-29 15:40:39 +00:00
|
|
|
frontend:
|
|
|
|
build:
|
|
|
|
context: ./docker/frontend
|
|
|
|
container_name: frontend
|
|
|
|
restart: always
|
|
|
|
networks:
|
|
|
|
- default
|
|
|
|
depends_on:
|
|
|
|
- backend
|
2022-02-02 14:38:36 +00:00
|
|
|
environment:
|
|
|
|
NODE_ENV: production
|
2022-01-29 15:40:39 +00:00
|
|
|
|
2022-01-23 08:12:57 +00:00
|
|
|
networks:
|
|
|
|
db:
|
|
|
|
redis:
|
2022-01-08 12:29:22 +00:00
|
|
|
|
|
|
|
volumes:
|
2022-01-23 08:12:57 +00:00
|
|
|
db:
|
|
|
|
redis:
|