Repository navigation
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
122 lines (115 loc) · 2.67 KB
/
Copy pathdocker-compose.yml
File metadata and controls
122 lines (115 loc) · 2.67 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
services:
api:
build:
context: ./apps/api
dockerfile: Dockerfile
ports:
- "8000:8000"
env_file:
- .env
environment:
DATABASE_URL: postgresql+asyncpg://consentos:consentos@postgres:5432/consentos
REDIS_URL: redis://redis:6379/0
volumes:
- ./apps/api:/app
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
restart: unless-stopped
postgres:
image: postgres:17-alpine
ports:
- "5432:5432"
environment:
POSTGRES_USER: consentos
POSTGRES_PASSWORD: consentos
POSTGRES_DB: consentos
volumes:
- pgdata:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U consentos"]
interval: 5s
timeout: 5s
retries: 5
restart: unless-stopped
redis:
image: redis:7-alpine
ports:
- "6379:6379"
volumes:
- redisdata:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 5s
retries: 5
restart: unless-stopped
scanner:
build:
context: ./apps/scanner
dockerfile: Dockerfile
ports:
- "8001:8001"
environment:
HOST: "0.0.0.0"
PORT: "8001"
LOG_LEVEL: INFO
CRAWLER_HEADLESS: "true"
depends_on:
- api
restart: unless-stopped
celery-worker:
build:
context: ./apps/api
dockerfile: Dockerfile
command: >
celery -A src.celery_app worker
--loglevel=info
--concurrency=2
env_file:
- .env
environment:
DATABASE_URL: postgresql+asyncpg://consentos:consentos@postgres:5432/consentos
REDIS_URL: redis://redis:6379/0
SCANNER_SERVICE_URL: http://scanner:8001
depends_on:
postgres:
condition: service_healthy
redis:
condition: service_healthy
scanner:
condition: service_started
restart: unless-stopped
celery-beat:
build:
context: ./apps/api
dockerfile: Dockerfile
command: >
celery -A src.celery_app beat
--loglevel=info
env_file:
- .env
environment:
DATABASE_URL: postgresql+asyncpg://consentos:consentos@postgres:5432/consentos
REDIS_URL: redis://redis:6379/0
depends_on:
redis:
condition: service_healthy
restart: unless-stopped
admin-ui:
build:
# Context is the repo root so the Dockerfile can pull in
# apps/banner/ alongside apps/admin-ui/ and bake both into
# a single nginx image.
context: .
dockerfile: apps/admin-ui/Dockerfile
ports:
- "5173:80"
depends_on:
- api
restart: unless-stopped
volumes:
pgdata:
redisdata: