bvplan/docker-compose.yml
2022-12-20 19:00:12 +01:00

76 lines
1.7 KiB
YAML

version: "3"
x-backend:
&backend
image: git.dergrimm.net/dergrimm/bvplan_backend:latest
build:
context: ./backend
restart: always
command: worker
depends_on:
- postgres
- rabbitmq
environment:
BACKEND_DB_URL: postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@postgres:5432/${POSTGRES_USER}
BACKEND_AMQP_URL: amqp://${RABBITMQ_USER}:${RABBITMQ_PASSWORD}@rabbitmq:5672
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}
services:
nginx:
image: docker.io/byjg/nginx-extras
restart: always
volumes:
- ./config/nginx/nginx.conf:/etc/nginx/nginx.conf:ro
ports:
- 80:80
depends_on:
- adminer
- rabbitmq
- api
postgres:
image: docker.io/postgres:alpine
restart: always
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
volumes:
- postgres:/var/lib/postgresql/data
adminer:
image: docker.io/adminer:standalone
restart: always
depends_on:
- postgres
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
worker:
<<: *backend
command: worker
api:
<<: *backend
command: api
depends_on:
- postgres
- rabbitmq
- worker
volumes:
postgres:
rabbitmq: