forked from CodeforNepal/nepalmap_app
-
Notifications
You must be signed in to change notification settings - Fork 0
/
compose.staging.yml
64 lines (60 loc) · 1.68 KB
/
compose.staging.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
version: '3'
services:
postgres:
image: library/postgres:9.5-alpine
environment:
POSTGRES_USER: wazimap_np
POSTGRES_PASSWORD: wazimap_np
POSTGRES_DB: wazimap_np
web:
build:
context: .
dockerfile: ./compose/web/Dockerfile
restart: always
command: wait-for-it postgres-host:5432 --strict --timeout=30 -- start-web
depends_on:
- postgres
links:
- postgres:postgres-host
volumes:
- ./:/usr/src/app
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8000"]
interval: 10s
timeout: 5s
retries: 3
environment:
- HOST_USER_ID
- HOST_GROUP_ID
- APP_ENV
- POSTGRES_HOST=postgres-host
- POSTGRES_PORT=5432
- POSTGRES_USERNAME=wazimap_np
- POSTGRES_PASSWORD=wazimap_np
- POSTGRES_DATABASE=wazimap_np
caddy:
build:
context: .
dockerfile: ./compose/caddy/Dockerfile
restart: always
entrypoint: wait-for-it web-host:8000 --strict --timeout=30 -- start-caddy
depends_on:
- web
links:
- web:web-host
volumes:
- ./compose/caddy/Caddyfile:/etc/Caddyfile
- ./compose/common/bin/wait-for-it:/usr/local/sbin/wait-for-it
- ./compose/caddy/bin/start-caddy:/usr/local/sbin/start-caddy
- ./certs:/etc/caddycerts
- ./static:/static
environment:
- APP_ENV
- CADDYPATH=/etc/caddycerts
- PROXY_HOST=web-host
- PROXY_PORT=8000
- HOST_NAME=staging.nepalmap.org # Change to staging server for nepalmap.org
- [email protected] # Enter a email address here link to LetsEncrypt certs
ports:
- "0.0.0.0:80:80"
- "0.0.0.0:443:443"