76 lines
1.4 KiB
YAML
76 lines
1.4 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
|
|
- redis
|
|
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
|
|
|
|
redis:
|
|
image: redis:latest
|
|
container_name: siren-redis
|
|
volumes:
|
|
- redis:/data
|
|
ports:
|
|
- ${REDIS_PORT:-6379}:6379
|
|
networks:
|
|
- backend
|
|
profiles:
|
|
- backend
|
|
restart: unless-stopped
|
|
|
|
volumes:
|
|
postgres:
|
|
postgres_logs:
|
|
redis:
|
|
|
|
networks:
|
|
frontend:
|
|
backend:
|