mentorenwahl/docker-compose.yml

116 lines
3.2 KiB
YAML
Raw Normal View History

# Mentorenwahl: A fullstack application for assigning mentors to students based on their whishes.
# Copyright (C) 2022 Dominic Grimm
2022-03-07 13:06:02 +00:00
#
# 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.
2022-03-07 13:06:02 +00:00
#
# 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.
2022-03-07 13:06:02 +00:00
#
# 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"
2022-01-08 12:29:22 +00:00
services:
nginx:
2022-11-21 18:48:53 +00:00
image: byjg/nginx-extras
2022-01-23 08:12:57 +00:00
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:
2023-01-17 05:56:19 +00:00
image: docker.io/postgres:alpine
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:
2023-01-17 05:56:19 +00:00
image: docker.io/adminer:standalone
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
restart: always
networks:
- redis
volumes:
- redis:/data
backend:
2022-11-21 18:48:53 +00:00
image: git.dergrimm.net/mentorenwahl/backend:latest
2022-01-08 12:29:22 +00:00
build:
2022-10-31 08:47:26 +00:00
context: ./backend
2022-01-08 12:29:22 +00:00
args:
BUILD_ENV: production
2022-01-23 08:12:57 +00:00
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}
2022-03-13 10:54:42 +00:00
BACKEND_MINIMUM_TEACHER_SELECTION_COUNT: ${BACKEND_MINIMUM_TEACHER_SELECTION_COUNT}
2022-07-28 12:05:10 +00:00
BACKEND_ASSIGNMENT_POSSIBILITY_COUNT: ${BACKEND_ASSIGNMENT_POSSIBILITY_COUNT}
2022-02-06 20:12:38 +00:00
BACKEND_API_JWT_SECRET: ${BACKEND_API_JWT_SECRET}
BACKEND_API_JWT_EXPIRATION: ${BACKEND_API_JWT_EXPIRATION}
2022-01-28 17:30:20 +00:00
BACKEND_SMTP_HELO: ${BACKEND_SMTP_HELO}
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}
BACKEND_DB_ALLOW_OLD_SCHEMA: ${BACKEND_DB_ALLOW_OLD_SCHEMA}
2022-03-07 08:34:18 +00:00
BACKEND_REDIS_HOST: redis
BACKEND_REDIS_PORT: 6379
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-03-07 08:34:18 +00:00
BACKEND_LDAP_CACHE_REFRESH_INTERVAL: ${BACKEND_LDAP_CACHE_REFRESH_INTERVAL}
2022-01-23 08:12:57 +00:00
2022-01-29 15:40:39 +00:00
frontend:
2022-11-21 18:48:53 +00:00
image: git.dergrimm.net/mentorenwahl/frontend:latest
2022-01-29 15:40:39 +00:00
build:
2022-10-31 08:47:26 +00:00
context: ./frontend
2022-01-29 15:40:39 +00:00
restart: always
networks:
- default
depends_on:
- backend
2022-01-23 08:12:57 +00:00
networks:
db:
redis:
2022-01-08 12:29:22 +00:00
2022-10-31 08:47:26 +00:00
2022-01-08 12:29:22 +00:00
volumes:
2022-01-23 08:12:57 +00:00
db:
redis: