-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
73 lines (68 loc) · 1.59 KB
/
docker-compose.yml
File metadata and controls
73 lines (68 loc) · 1.59 KB
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
services:
db:
image: postgres:15.2
environment:
POSTGRES_DB: aphrc_ssds
POSTGRES_USER: aphrc_ssds
POSTGRES_PASSWORD: aphrc_ssds_pw
restart: always
volumes:
- aphrc_dashboard_db:/var/lib/postgresql/data
networks:
- web
web:
build:
context: .
depends_on:
- db
expose:
- "8090"
env_file: .env
environment:
- HS_API_KEY
- HS_TICKET_PIPELINE
- HS_TICKET_PIPELINE_STAGE
- ENVIRONMENT
- SITE_URL
working_dir: /code/
volumes:
- ./:/code/
restart: always
networks:
- web
nginx:
container_name: nginx
build: ./config/nginx/
env_file: .env.nginx
environment:
- SITE_URL
ports:
- "80:80"
- "443:443"
volumes:
- ./certbot/conf:/etc/ssl
- ./certbot/www:/var/www/certbot
- ./static:/static
- ./media:/media
restart: always
command: /bin/sh -c "envsubst '$$SITE_URL' < /etc/nginx/conf.d/nginx.template > /etc/nginx/conf.d/nginx.conf && while :; do sleep 12h & wait $${!}; nginx -s reload; done & nginx -g 'daemon off;'"
networks:
- web
certbot:
container_name: CertBot
image: certbot/certbot
restart: unless-stopped
user: "${USER_INFO}"
volumes:
- ./certbot/conf:/etc/letsencrypt
- ./certbot/www:/var/www/certbot
- ./certbot_logs:/var/log/letsencrypt
depends_on:
- nginx
networks:
- web
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"
volumes:
aphrc_dashboard_db:
networks:
web: