-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
86 lines (79 loc) · 2.02 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
version: '3'
services:
nginx-proxy:
image: jwilder/nginx-proxy
ports:
- "80:80"
- "443:443"
volumes:
- certs:/etc/nginx/certs
- vhostd:/etc/nginx/vhost.d
- html:/usr/share/nginx/html
- /var/run/docker.sock:/tmp/docker.sock:ro
networks:
- default
labels:
com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy: "true"
letsencrypt:
image: jrcs/letsencrypt-nginx-proxy-companion
restart: always
networks:
- default
environment:
- NGINX_PROXY_CONTAINER=nginx-proxy
volumes:
- certs:/etc/nginx/certs:rw
- vhostd:/etc/nginx/vhost.d
- html:/usr/share/nginx/html
- /var/run/docker.sock:/var/run/docker.sock:ro
db:
image: mariadb:5.5.64
networks:
- backend
environment:
- MYSQL_ROOT_PASSWORD=${DB_PW}
- MYSQL_DATABASE=${DB_NAME}
volumes:
- ./.mariadb-docker:/var/lib/mysql
front:
build: ./packages/front
networks:
- default
environment:
- BACK_URL=https://${BACK_VIRTUAL_HOST}
- NODE_ENV=${NODE_ENV}
- VIRTUAL_HOST=${FRONT_VIRTUAL_HOST}
- VIRTUAL_PORT=${FRONT_VIRTUAL_PORT}
- LETSENCRYPT_HOST=${FRONT_VIRTUAL_HOST}
- LETSENCRYPT_EMAIL=${LETSENCRYPT_EMAIL}
back:
build: ./packages/back
networks:
- backend
- default
command: sh -c './wait-for db:3306 -- node ./src/index.js'
depends_on:
- db
environment:
- FRONT_URL=${FRONT_VIRTUAL_HOST}
- DB_HOST=${DB_HOST}
- DB_USER=${DB_USER}
- DB_PW=${DB_PW}
- DB_NAME=${DB_NAME}
- NODE_ENV=${NODE_ENV}
- VIRTUAL_HOST=${BACK_VIRTUAL_HOST}
- VIRTUAL_PORT=${BACK_VIRTUAL_PORT}
- LETSENCRYPT_HOST=${BACK_VIRTUAL_HOST}
- LETSENCRYPT_EMAIL=${LETSENCRYPT_EMAIL}
- EMAIL_ACCOUNT_USERNAME=${EMAIL_ACCOUNT_USERNAME}
- EMAIL_ACCOUNT_PW=${EMAIL_ACCOUNT_PW}
volumes:
- uploads:/usr/src/back/public:rw
networks:
default:
backend:
volumes:
certs:
html:
vhostd:
uploads: