bvplan/docker-compose.yml
2023-02-27 14:04:16 +01:00

107 lines
2.4 KiB
YAML

version: "3"
x-bvplan:
&bvplan
image: git.dergrimm.net/dergrimm/bvplan_backend:latest
build:
context: ./bvplan
restart: always
command: worker
depends_on:
- db
- rabbitmq
- redis
environment:
BACKEND_DB_URL: postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_USER}
BACKEND_AMQP_URL: amqp://${RABBITMQ_USER}:${RABBITMQ_PASSWORD}@rabbitmq:5672
BACKEND_REDIS_URL: redis://redis:6379
BACKEND_UNTIS_API_URL: ${BACKEND_UNTIS_API_URL}
BACKEND_UNTIS_RPC_URL: ${BACKEND_UNTIS_RPC_URL}
BACKEND_UNTIS_CLIENT_NAME: ${BACKEND_UNTIS_CLIENT_NAME}
BACKEND_UNTIS_SCHOOL: ${BACKEND_UNTIS_SCHOOL}
BACKEND_UNTIS_USERNAME: ${BACKEND_UNTIS_USERNAME}
BACKEND_UNTIS_PASSWORD: ${BACKEND_UNTIS_PASSWORD}
BACKEND_UNTIS_VPLAN_URL: ${BACKEND_UNTIS_VPLAN_URL}
BACKEND_UNTIS_VPLAN_USERNAME: ${BACKEND_UNTIS_VPLAN_USERNAME}
BACKEND_UNTIS_VPLAN_PASSWORD: ${BACKEND_UNTIS_VPLAN_PASSWORD}
services:
nginx:
image: docker.io/byjg/nginx-extras
restart: always
volumes:
- ./config/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
ports:
- 80:80
- 8080:8080
depends_on:
- adminer
- rabbitmq
- web
- redis-commander
db:
image: docker.io/postgres:15-alpine
restart: always
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
volumes:
- db:/var/lib/postgresql/data
adminer:
image: docker.io/adminer:standalone
restart: always
depends_on:
- db
rabbitmq:
image: docker.io/rabbitmq:3-management-alpine
restart: always
environment:
RABBITMQ_DEFAULT_USER: ${RABBITMQ_USER}
RABBITMQ_DEFAULT_PASS: ${RABBITMQ_PASSWORD}
volumes:
- rabbitmq:/var/lib/rabbitmq
redis:
image: docker.io/redis:alpine
restart: always
volumes:
- redis:/data
redis-commander:
image: rediscommander/redis-commander:latest
restart: always
environment:
REDIS_HOSTS: local:redis:6379
URL_PREFIX: /redis
depends_on:
- redis
worker:
<<: *bvplan
command: worker
volumes:
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
- ./data/backups:/backups
web:
<<: *bvplan
command: web
depends_on:
- db
- rabbitmq
- worker
- redis
volumes:
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
volumes:
db:
rabbitmq:
redis: