-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.staging.yml
72 lines (67 loc) · 1.7 KB
/
docker-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
65
66
67
68
69
70
71
72
version: "3.8"
services:
app:
build:
context: .
dockerfile: ./compose/Dockerfile
args:
BUILD_MODE: staging
command: make run-gunicorn-docker
env_file:
- ./.envs/.staging/.django
- ./.envs/.staging/.db
volumes:
- static_volume:/home/app/web/staticfiles
- media_volume:/home/app/web/mediafiles
expose:
- 8000
depends_on:
- postgres
postgres:
image: postgres:13.0-alpine
env_file:
- ./.envs/.staging/.db
volumes:
- postgres_volume:/var/lib/postgresql/data
nginx-proxy:
container_name: nginx-proxy
build: ./compose/nginx
restart: always
ports:
- 443:443
- 80:80
volumes:
- static_volume:/home/app/web/staticfiles
- media_volume:/home/app/web/mediafiles
- certs:/etc/nginx/certs
- html:/usr/share/nginx/html
- vhost:/etc/nginx/vhost.d
- /var/run/docker.sock:/tmp/docker.sock:ro
depends_on:
- app
nginx-proxy-letsencrypt:
image: jrcs/letsencrypt-nginx-proxy-companion
env_file:
- ./.envs/.staging/.nginx-proxy-letsencrypt
environment:
# Use Letsencrypt staging environment with no rate limits
# for issuing certificates.
# https://letsencrypt.org/docs/staging-environment/
- ACME_CA_URI=https://acme-staging-v02.api.letsencrypt.org/directory
- NGINX_PROXY_CONTAINER=nginx-proxy
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- certs:/etc/nginx/certs
- html:/usr/share/nginx/html
- vhost:/etc/nginx/vhost.d
- acme:/etc/acme.sh
depends_on:
- nginx-proxy
volumes:
postgres_volume:
static_volume:
media_volume:
certs:
html:
vhost:
acme: