mentorenwahl/docker-compose.yml
Dominic Grimm 286a99cd77
All checks were successful
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is passing
Added documentation for Config
2022-02-07 18:52:17 +01:00

102 lines
2.2 KiB
YAML

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: