2018-08-08 14:14:45 +00:00
|
|
|
services:
|
|
|
|
|
db:
|
2026-02-17 04:31:50 +00:00
|
|
|
image: postgres:16-alpine
|
2026-07-27 02:35:38 +00:00
|
|
|
env_file:
|
|
|
|
|
- .env.docker
|
|
|
|
|
# Optional local overrides (gitignored); values here win over .env.docker.
|
|
|
|
|
- path: .env.docker.local
|
|
|
|
|
required: false
|
2026-02-17 04:31:50 +00:00
|
|
|
volumes:
|
|
|
|
|
- postgres_data:/var/lib/postgresql/data
|
|
|
|
|
- ./docker/postgres/init-rls-user.sql:/docker-entrypoint-initdb.d/init-rls-user.sql:ro
|
|
|
|
|
healthcheck:
|
|
|
|
|
test: ["CMD-SHELL", "pg_isready -U postgres"]
|
|
|
|
|
interval: 5s
|
|
|
|
|
timeout: 3s
|
|
|
|
|
retries: 5
|
|
|
|
|
ports:
|
|
|
|
|
- "5432:5432"
|
|
|
|
|
|
|
|
|
|
redis:
|
|
|
|
|
image: redis:7-alpine
|
|
|
|
|
healthcheck:
|
|
|
|
|
test: ["CMD", "redis-cli", "ping"]
|
|
|
|
|
interval: 5s
|
|
|
|
|
timeout: 3s
|
|
|
|
|
retries: 5
|
|
|
|
|
ports:
|
|
|
|
|
- "6379:6379"
|
2019-02-18 08:45:58 +00:00
|
|
|
|
2026-02-17 04:31:50 +00:00
|
|
|
backend:
|
|
|
|
|
build:
|
|
|
|
|
context: .
|
|
|
|
|
dockerfile: Dockerfile
|
2026-07-27 02:35:38 +00:00
|
|
|
env_file:
|
|
|
|
|
- .env.docker
|
|
|
|
|
# Optional local overrides (gitignored); values here win over .env.docker.
|
|
|
|
|
- path: .env.docker.local
|
|
|
|
|
required: false
|
2026-02-17 04:31:50 +00:00
|
|
|
volumes:
|
|
|
|
|
- ./backend:/app
|
|
|
|
|
- ./docker/backend/entrypoint.sh:/entrypoint.sh:ro
|
2018-08-08 14:14:45 +00:00
|
|
|
ports:
|
2026-02-17 04:31:50 +00:00
|
|
|
- "8000:8000"
|
|
|
|
|
depends_on:
|
|
|
|
|
db:
|
|
|
|
|
condition: service_healthy
|
|
|
|
|
redis:
|
|
|
|
|
condition: service_healthy
|
|
|
|
|
command: /bin/bash /entrypoint.sh
|
|
|
|
|
|
|
|
|
|
celery-worker:
|
|
|
|
|
build:
|
|
|
|
|
context: .
|
|
|
|
|
dockerfile: Dockerfile
|
2026-07-27 02:35:38 +00:00
|
|
|
env_file:
|
|
|
|
|
- .env.docker
|
|
|
|
|
# Optional local overrides (gitignored); values here win over .env.docker.
|
|
|
|
|
- path: .env.docker.local
|
|
|
|
|
required: false
|
2026-02-17 04:31:50 +00:00
|
|
|
volumes:
|
|
|
|
|
- ./backend:/app
|
2018-08-08 14:14:45 +00:00
|
|
|
depends_on:
|
2026-02-17 04:31:50 +00:00
|
|
|
db:
|
|
|
|
|
condition: service_healthy
|
|
|
|
|
redis:
|
|
|
|
|
condition: service_healthy
|
|
|
|
|
command: celery -A crm worker --loglevel=info
|
|
|
|
|
|
|
|
|
|
celery-beat:
|
|
|
|
|
build:
|
|
|
|
|
context: .
|
|
|
|
|
dockerfile: Dockerfile
|
2026-07-27 02:35:38 +00:00
|
|
|
env_file:
|
|
|
|
|
- .env.docker
|
|
|
|
|
# Optional local overrides (gitignored); values here win over .env.docker.
|
|
|
|
|
- path: .env.docker.local
|
|
|
|
|
required: false
|
2026-02-17 04:31:50 +00:00
|
|
|
volumes:
|
|
|
|
|
- ./backend:/app
|
|
|
|
|
depends_on:
|
|
|
|
|
db:
|
|
|
|
|
condition: service_healthy
|
|
|
|
|
redis:
|
|
|
|
|
condition: service_healthy
|
|
|
|
|
command: celery -A crm beat --loglevel=info
|
|
|
|
|
|
|
|
|
|
frontend:
|
|
|
|
|
build:
|
|
|
|
|
context: ./frontend
|
|
|
|
|
dockerfile: Dockerfile
|
2026-08-12 14:49:53 +00:00
|
|
|
# frontend/Dockerfile is multi-stage and its LAST stage is the production
|
|
|
|
|
# server. Without this, compose would build that instead and run a
|
|
|
|
|
# prebuilt bundle against the source mount below, which never reloads.
|
|
|
|
|
target: dev
|
2026-07-27 02:35:38 +00:00
|
|
|
env_file:
|
|
|
|
|
- .env.docker
|
|
|
|
|
# Optional local overrides (gitignored); values here win over .env.docker.
|
|
|
|
|
- path: .env.docker.local
|
|
|
|
|
required: false
|
2026-02-17 04:31:50 +00:00
|
|
|
volumes:
|
|
|
|
|
- ./frontend:/app
|
|
|
|
|
- frontend_node_modules:/app/node_modules
|
|
|
|
|
ports:
|
2026-09-26 11:54:25 +00:00
|
|
|
- "5181:5181"
|
2026-02-17 04:31:50 +00:00
|
|
|
|
|
|
|
|
volumes:
|
|
|
|
|
postgres_data:
|
|
|
|
|
frontend_node_modules:
|