-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.ci.yml
73 lines (73 loc) · 1.85 KB
/
docker-compose.ci.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
---
version: "3.9"
services:
backend:
image: eu.gcr.io/akvo-lumen/rtmis/backend:latest
command: ["sh", "run.sh"]
depends_on:
db:
condition: service_healthy
environment:
- DB_SCHEMA=rtmis
- DB_USER=akvo
- DB_PASSWORD=password
- DB_HOST=db
- DJANGO_SECRET=ci-secret
- DEBUG=True
- MAILJET_APIKEY=$MAILJET_APIKEY
- MAILJET_SECRET=$MAILJET_SECRET
- WEBDOMAIN=notset
- APK_UPLOAD_SECRET=ci-secret
- SENTRY_DSN
network_mode: service:mainnetwork
restart: always
volumes:
- ./backend:/app:delegated
- ${SERVICE_ACCOUNT}:/credentials/:ro
working_dir: /app
ci:
image: alpine:3.14
depends_on:
- backend
- db
- frontend
entrypoint: ./entrypoint.sh
network_mode: service:mainnetwork
volumes:
- ./ci/test:/test:ro
working_dir: /test
db:
image: postgres:12-alpine
command:
postgres -c 'shared_buffers=128MB' -c 'fsync=off' -c 'synchronous_commit=off'
-c 'full_page_writes=off' -c 'max_connections=100' -c 'bgwriter_lru_maxpages=0'
-c 'client_min_messages=warning'
environment:
- POSTGRES_PASSWORD=password
ports:
- 5432:5432
restart: always
volumes:
- ./db/docker-entrypoint-initdb.d/000-init.sql:/docker-entrypoint-initdb.d/000-init.sql
- pg-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready"]
interval: 10s
timeout: 5s
retries: 5
frontend:
image: eu.gcr.io/akvo-lumen/rtmis/frontend:latest
command: ["nginx", "-g", "daemon off;"]
depends_on:
- backend
network_mode: service:mainnetwork
volumes:
- ./frontend:/app:delegated
working_dir: /app
mainnetwork:
image: alpine:3.14
command: ["tail", "-f", "/dev/null"]
ports:
- 8000:8000
volumes:
pg-data: {}