-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
184 lines (176 loc) · 5 KB
/
docker-compose.yml
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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
# This docker-compose configuration is for ICMS development and CI environment.
# Production deployment does not use this configuration.
#
# see https://hub.docker.com/ for the images used here
services:
db:
image: postgres:16.1
volumes:
- pgdata:/var/lib/postgresql/data
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=password
ports:
- "6000:5432"
networks:
- backend
healthcheck:
test: [ "CMD-SHELL", "pg_isready -U postgres" ]
interval: 2s
timeout: 2s
retries: 5
web:
build:
context: .
dockerfile: local_deployment/Dockerfile
command: local_deployment/entry.sh
environment:
- DJANGO_SETTINGS_MODULE
- PYTHONUNBUFFERED=1
- ICMS_WEB_PORT
- ICMS_DEBUG=True
- ICMS_INCLUDE_PRIVATE_URLS=False
- ICMS_WEB_PORT=8080
env_file:
- .env
ports:
- "8080:8080"
# Enable the following for PDB
# stdin_open: true
# tty: true
# Add this in code: import pdb; pdb.set_trace() or breakpoint()
# Get container ID: docker ps
# Then attach: docker attach <container id>
# To exit: Ctrl + P, Ctrl + Q
depends_on:
db:
condition: service_healthy
redis:
condition: service_started
volumes:
- ./test-reports:/code/test-reports # needed for ci
- .:/code
networks:
backend:
aliases:
- export-a-certificate
- import-a-licence
web-internal:
build:
context: .
dockerfile: local_deployment/Dockerfile
command: local_deployment/entry.sh
environment:
- DJANGO_SETTINGS_MODULE
- PYTHONUNBUFFERED=1
- ICMS_WEB_PORT
- ICMS_DEBUG=True
- ICMS_INCLUDE_PRIVATE_URLS=True
- ICMS_WEB_PORT=8008
env_file:
- .env
ports:
- "8008:8008"
depends_on:
db:
condition: service_healthy
redis:
condition: service_started
volumes:
- ./test-reports:/code/test-reports # needed for ci
- .:/code
networks:
backend:
aliases:
- caseworker
public:
aliases:
- caseworker # Required for ICMS-HMRC to communicate with ICMS.
redis:
# The version we will run when migrating to DBT Platform
image: redis:7.0.15
volumes:
- redis_data:/data
ports:
- "6379"
networks:
- backend
celery-worker:
build:
context: .
dockerfile: local_deployment/Dockerfile
command: celery --app=config.celery:app worker --loglevel=INFO -Q celery,mail,reports
environment:
- DJANGO_SETTINGS_MODULE
env_file:
- .env
depends_on:
db:
condition: service_healthy
redis:
condition: service_started
volumes:
- .:/code
networks:
- backend
- public
healthcheck:
test: [ "CMD-SHELL", "python -m dbt_copilot_python.celery_health_check.healthcheck" ]
interval: 10s
timeout: 5s
retries: 2
start_period: 5s
celery-beat:
build:
context: .
dockerfile: local_deployment/Dockerfile
environment:
- DJANGO_SETTINGS_MODULE
env_file:
- .env
command: celery --app=config.celery:app beat --loglevel=INFO
depends_on:
- redis
volumes:
- .:/code
networks:
- backend
localstack:
container_name: localstack_main
image: localstack/localstack:0.14.2
ports:
- "4510-4559:4510-4559" # external service port range
- "4566:4566" # LocalStack Edge Proxy
environment:
- DEBUG=0
- DATA_DIR=/tmp/localstack/data
- LAMBDA_EXECUTOR=${LAMBDA_EXECUTOR-}
- DOCKER_HOST=unix:///var/run/docker.sock
- HOSTNAME_EXTERNAL="localstack"
- SERVICES=s3
volumes:
- ls_data:/tmp/localstack
- "/var/run/docker.sock:/var/run/docker.sock"
networks:
- backend
playwright-runner:
build:
context: .
dockerfile: playwright/Dockerfile
env_file:
- .env
networks:
- backend
ipc: host
volumes:
- .:/code
networks:
public:
driver: bridge
name: "icms_public"
backend:
name: "icms_backend"
volumes:
pgdata:
ls_data:
redis_data: