-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yaml
More file actions
31 lines (31 loc) · 1.36 KB
/
Copy pathcompose.yaml
File metadata and controls
31 lines (31 loc) · 1.36 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
services:
postgres:
build:
context: ./docker/postgres
dockerfile: Dockerfile
image: reflex-p0-postgres:local
environment:
POSTGRES_DB: analytics
POSTGRES_USER: postgres
POSTGRES_PASSWORD: "${POSTGRES_PASSWORD:-postgres}"
volumes: [postgres-data:/var/lib/postgresql/data]
healthcheck: { test: ["CMD-SHELL", "pg_isready -U postgres -d analytics"], interval: 5s, timeout: 3s, retries: 20 }
redis:
image: redis:7-alpine
command: redis-server --appendonly yes
volumes: [redis-data:/data]
healthcheck: { test: ["CMD", "redis-cli", "ping"], interval: 5s, timeout: 3s, retries: 20 }
web:
build: { context: ., dockerfile: apps/web/Dockerfile }
environment:
DATABASE_URL: "postgresql+asyncpg://postgres:${POSTGRES_PASSWORD:-postgres}@postgres:5432/analytics"
REDIS_URL: redis://redis:6379/0
ALLOW_OPEN_REGISTRATION: "false"
depends_on: { postgres: { condition: service_healthy }, redis: { condition: service_healthy } }
worker:
build: { context: ., dockerfile: apps/worker/Dockerfile }
environment:
DATABASE_URL: "postgresql+asyncpg://postgres:${POSTGRES_PASSWORD:-postgres}@postgres:5432/analytics"
REDIS_URL: redis://redis:6379/0
depends_on: { postgres: { condition: service_healthy }, redis: { condition: service_healthy } }
volumes: { postgres-data: {}, redis-data: {} }