Files
siren/docker-compose.yml
2024-10-13 17:38:18 -04:00

62 lines
1.2 KiB
YAML

x-env_file: &env
- path: .env
required: true
- path: .env.local
required: false
name: siren
services:
bot:
image: siren-service:${SIREN_VERSION:-latest}
container_name: siren-bot
build:
context: .
dockerfile: ./Dockerfile
args:
- VERSION=${SIREN_VERSION:-latest}
env_file: *env
environment:
DATABASE_HOST: postgres
DATABASE_PORT: 5432
REDIS_HOST: redis
REDIS_PORT: 6379
DATA_DIR_PATH: /data
volumes:
- ${DATA_DIR_PATH:-~/data}:/data
depends_on:
- postgres
networks:
- frontend
- backend
restart: unless-stopped
profiles:
- bot
postgres:
image: postgres:latest
container_name: siren-postgres
env_file: *env
environment:
POSTGRES_USER: ${DATABASE_USER}
POSTGRES_PASSWORD: ${DATABASE_PASSWORD}
POSTGRES_DB: ${DATABASE_NAME}
volumes:
- postgres:/var/lib/postgresql/data
- postgres_logs:/var/log
ports:
- ${DATABASE_PORT:-5432}:5432
networks:
- backend
profiles:
- backend
restart: unless-stopped
volumes:
postgres:
postgres_logs:
networks:
frontend:
backend: