forked from UTSCC09/project-verycoolproject
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
49 lines (45 loc) · 1.19 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
version: '2'
services:
# nginx reverse proxy
nginx-proxy:
image: jwilder/nginx-proxy
container_name: nginx-proxy
restart: always
ports:
- "80:80"
- "443:443"
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
- ./certs:/etc/nginx/certs
- ./vhost:/etc/nginx/vhost.d
- ./html:/usr/share/nginx/html
# reverse proxy let's encrypt companion
nginx-proxy-acme:
image: nginxproxy/acme-companion
container_name: nginx-proxy-acme
restart: always
volumes_from:
- nginx-proxy
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./acme:/etc/acme.sh
environment:
# React frontend
frontend:
image: frontend
container_name: frontend
restart: always
# certificate information for let's encrypt
environment:
- VIRTUAL_HOST=${FRONTEND_DOMAIN}
- LETSENCRYPT_HOST=${FRONTEND_DOMAIN}
# react backend
backend:
image: backend
container_name: backend
restart: always
# certificate information for let's encrypt
environment:
- VIRTUAL_HOST=${BACKEND_DOMAIN}
- LETSENCRYPT_HOST=${BACKEND_DOMAIN}