-
Notifications
You must be signed in to change notification settings - Fork 2
/
docker-compose.yml
52 lines (48 loc) · 1.18 KB
/
docker-compose.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
version: '3.6'
services:
redis-cache:
image: redis:alpine
restart: always
api:
depends_on:
- redis-cache
env_file:
- backend/.env
build:
context: ./backend
dockerfile: Dockerfile
restart: always
volumes:
- './backend:/backend'
client:
depends_on:
- api
build:
context: ./frontend
dockerfile: Dockerfile
volumes:
- /app/node_modules
- ./frontend:/app
nginx:
image: nginx:alpine
restart: always
depends_on:
- client
- certbot
volumes:
- ./nginx-proxy/prod.default.conf:/etc/nginx/conf.d/default.conf
- ./nginx-proxy/certbot/conf:/etc/letsencrypt
- ./nginx-proxy/certbot/www:/var/www/certbot
ports:
- '80:80'
- '443:443'
command: '/bin/sh -c ''while :; do sleep 6h & wait $${!}; nginx -s reload; done & nginx -g "daemon off;"'''
certbot:
image: certbot/certbot
restart: always
depends_on:
- client
volumes:
- ./nginx-proxy/certbot/conf:/etc/letsencrypt
- ./nginx-proxy/certbot/www:/var/www/certbot
entrypoint: "/bin/sh -c 'trap exit TERM; while :; do certbot renew; sleep 12h & wait $${!}; done;'"