mentorenwahl/docker-compose.yml

42 lines
833 B
YAML
Raw Normal View History

2022-01-08 12:29:22 +00:00
services:
nginx:
container_name: nginx
image: nginx:alpine
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-20 20:17:24 +00:00
- api
2022-01-08 12:29:22 +00:00
db:
image: postgres:alpine
2022-01-08 12:29:22 +00:00
container_name: db
env_file: .env
environment:
POSTGRES_USER: ${POSTGRES_USER}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
volumes:
- db:/var/lib/postgresql/data
adminer:
image: adminer:standalone
2022-01-08 12:29:22 +00:00
container_name: adminer
depends_on:
- db
2022-01-20 20:17:24 +00:00
api:
2022-01-08 12:29:22 +00:00
build:
2022-01-20 20:17:24 +00:00
context: ./docker/api
2022-01-08 12:29:22 +00:00
args:
BUILD_ENV: production
2022-01-20 20:17:24 +00:00
container_name: api
2022-01-08 12:29:22 +00:00
environment:
2022-01-20 20:17:24 +00:00
API_DATABASE_URL: postgres://${POSTGRES_USER}:${POSTGRES_PASSWORD}@db:5432/${POSTGRES_USER}
API_JWT_SECRET: ${API_JWT_SECRET}
2022-01-08 12:29:22 +00:00
depends_on:
- db
volumes:
db: null