117 lines
3 KiB
YAML
117 lines
3 KiB
YAML
# 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/>.
|
|
|
|
version: "3"
|
|
|
|
services:
|
|
nginx:
|
|
image: nginx:alpine
|
|
container_name: nginx
|
|
restart: always
|
|
volumes:
|
|
- ./config/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
|
|
ports:
|
|
- 80:80
|
|
depends_on:
|
|
- adminer
|
|
- backend
|
|
- frontend
|
|
|
|
db:
|
|
image: postgres:alpine
|
|
container_name: db
|
|
restart: always
|
|
networks:
|
|
- db
|
|
environment:
|
|
POSTGRES_USER: ${POSTGRES_USER}
|
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
|
volumes:
|
|
- db:/var/lib/postgresql/data
|
|
|
|
adminer:
|
|
image: adminer:standalone
|
|
container_name: adminer
|
|
restart: always
|
|
networks:
|
|
- default
|
|
- db
|
|
depends_on:
|
|
- db
|
|
|
|
redis:
|
|
image: redis:alpine
|
|
container_name: redis
|
|
restart: always
|
|
networks:
|
|
- redis
|
|
volumes:
|
|
- redis:/data
|
|
|
|
backend:
|
|
build:
|
|
context: ./docker/backend
|
|
args:
|
|
BUILD_ENV: production
|
|
container_name: backend
|
|
restart: always
|
|
networks:
|
|
- default
|
|
- db
|
|
- redis
|
|
depends_on:
|
|
- db
|
|
- redis
|
|
environment:
|
|
BACKEND_URL: ${URL}
|
|
BACKEND_API_GRAPHQL_PLAYGROUND: ${BACKEND_API_GRAPHQL_PLAYGROUND}
|
|
BACKEND_API_JWT_SECRET: ${BACKEND_API_JWT_SECRET}
|
|
BACKEND_WORKER_REDIS_URL: redis://redis:6379
|
|
BACKEND_SMTP_HELO: ${BACKEND_SMTP_HELO}
|
|
BACKEND_SMTP_HOST: ${BACKEND_SMTP_HOST}
|
|
BACKEND_SMTP_PORT: ${BACKEND_SMTP_PORT}
|
|
BACKEND_SMTP_NAME: ${BACKEND_SMTP_NAME}
|
|
BACKEND_SMTP_USERNAME: ${BACKEND_SMTP_USERNAME}
|
|
BACKEND_SMTP_PASSWORD: ${BACKEND_SMTP_PASSWORD}
|
|
BACKEND_DB_URL: postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_USER}
|
|
BACKEND_LDAP_HOST: ${BACKEND_LDAP_HOST}
|
|
BACKEND_LDAP_PORT: ${BACKEND_LDAP_PORT}
|
|
BACKEND_LDAP_BASE_DN: ${BACKEND_LDAP_BASE_DN}
|
|
BACKEND_LDAP_BASE_USER_DN: ${BACKEND_LDAP_BASE_USER_DN}
|
|
BACKEND_LDAP_BIND_DN: ${BACKEND_LDAP_BIND_DN}
|
|
BACKEND_LDAP_BIND_PASSWORD: ${BACKEND_LDAP_BIND_PASSWORD}
|
|
|
|
frontend:
|
|
build:
|
|
context: ./docker/frontend
|
|
args:
|
|
BUILD_ENV: production
|
|
container_name: frontend
|
|
restart: always
|
|
networks:
|
|
- default
|
|
depends_on:
|
|
- backend
|
|
environment:
|
|
NODE_ENV: production
|
|
|
|
networks:
|
|
db:
|
|
redis:
|
|
|
|
volumes:
|
|
db:
|
|
redis:
|