-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
63 lines (57 loc) · 1.8 KB
/
Copy pathdocker-compose.yml
File metadata and controls
63 lines (57 loc) · 1.8 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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
version: "3.9"
services:
postgres:
image: postgres:16-alpine
environment:
POSTGRES_DB: ${POSTGRES_DB:-contract_platform}
POSTGRES_USER: ${POSTGRES_USER:-postgres}
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD:-postgres}
ports:
- "5433:5432"
volumes:
- contract_platform_pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${POSTGRES_USER:-postgres} -d ${POSTGRES_DB:-contract_platform}"]
interval: 5s
timeout: 5s
retries: 10
redis:
image: redis:7-alpine
ports:
- "6379:6379"
command: ["redis-server", "--appendonly", "yes"]
volumes:
- contract_platform_redisdata:/data
api:
build:
context: .
dockerfile: docker/api.Dockerfile
environment:
DATABASE_URL: postgresql+psycopg://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@postgres:5432/${POSTGRES_DB:-contract_platform}
REDIS_URL: redis://redis:6379/0
APP_SECRET: ${APP_SECRET:-dev-secret-change-me}
COOKIE_DOMAIN: ${COOKIE_DOMAIN:-}
COOKIE_SECURE: ${COOKIE_SECURE:-false}
ports:
- "8000:8000"
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_started
worker:
build:
context: .
dockerfile: docker/worker.Dockerfile
environment:
DATABASE_URL: postgresql+psycopg://${POSTGRES_USER:-postgres}:${POSTGRES_PASSWORD:-postgres}@postgres:5432/${POSTGRES_DB:-contract_platform}
REDIS_URL: redis://redis:6379/0
APP_SECRET: ${APP_SECRET:-dev-secret-change-me}
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_started
volumes:
contract_platform_pgdata:
contract_platform_redisdata: