-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose-proxy.yml
50 lines (46 loc) · 1.06 KB
/
docker-compose-proxy.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
version: "3.7"
services:
app:
build:
context: .
healthcheck:
test: ["CMD-SHELL", "uwsgi-is-ready --stats-socket /tmp/statsock > /dev/null 2>&1 || exit 1"]
image: api
volumes:
- ./app:/app
- static_data:/vol/web
environment:
- DB_HOST=db
- DB_NAME=api
- DB_USER=postgres
- DB_PASS=supersecretpassword
- GET_DB_SECRET=0
- ALLOWED_HOSTS=*
- ALLOWED_CIDR_NETS=127.0.0.0/8
- S3_STORAGE_BACKEND=0
depends_on:
db:
condition: service_healthy
proxy:
image: proxy:latest
depends_on:
- app
healthcheck:
test: ["CMD-SHELL", "curl -so /dev/null http://localhost:8000/health || exit 1"]
ports:
- "8000:8000"
volumes:
- static_data:/vol/static
db:
image: postgres:10-alpine
environment:
- POSTGRES_DB=api
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=supersecretpassword
healthcheck:
test: ["CMD-SHELL", "pg_isready"]
interval: 10s
timeout: 5s
retries: 5
volumes:
static_data: