-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yaml
91 lines (82 loc) · 2.12 KB
/
docker-compose.yaml
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
87
88
89
version: '3'
services:
flask:
build: server/
ports:
- 127.0.0.1:5000:5000
# - 127.0.0.1:5001:443
restart: always
environment:
FLASK_ENV: development
FLASK_RUN_HOST: 0.0.0.0
DB_CONNECTION_STRING: "mysql+pymysql://dictogloss:${PASSWORD}@mysql:3306/dictogloss"
VIRTUAL_HOST: "api.${DOMAIN}"
VIRTUAL_PORT: 5000
VIRTUAL_PROTO: https
volumes:
- ./letsencrypt:/etc/letsencrypt
- site:/usr/src
command: python -u -m flask run
front_end:
restart: always
build: front-end
expose:
- 8080
environment:
VIRTUAL_HOST: ${DOMAIN}
VIRTUAL_PORT: 8080
VIRTUAL_PROTO: http
VUE_APP_API: http://api.localhost
# NODE_ENV: production
volumes:
- ./front-end:/usr/src/app
command: npm run serve
mysql:
restart: always
image: mysql/mysql-server:8.0
ports:
- 3306:3306
environment:
MYSQL_USER: dictogloss
MYSQL_PASSWORD: ${PASSWORD}
MYSQL_DATABASE: dictogloss
volumes:
- database:/var/lib/mysql
# SEE: https://github.com/buchdag/letsencrypt-nginx-proxy-companion-compose/blob/master/2-containers/compose-v3/labels/docker-compose.yaml
# For examples on how to set up the letsencrypt service
nginx_proxy:
image: jwilder/nginx-proxy:alpine
container_name: nginx_proxy
volumes:
- conf:/etc/nginx/conf.d
- vhost:/etc/nginx/vhost.d
- html:/usr/share/nginx/html
- dhparam:/etc/nginx/dhparam
- certs:/etc/nginx/certs:ro
- /var/run/docker.sock:/tmp/docker.sock:ro
labels:
- "com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy"
ports:
- 80:80
- 443:443
restart: always
letsencrypt:
image: jrcs/letsencrypt-nginx-proxy-companion
container_name: nginx-proxy-le
depends_on:
- nginx_proxy
volumes:
- vhost:/etc/nginx/vhost.d
- html:/usr/share/nginx/html
- dhparam:/etc/nginx/dhparam:ro
- certs:/etc/nginx/certs
- /var/run/docker.sock:/var/run/docker.sock:ro
restart: always
volumes:
site:
conf:
vhost:
html:
dhparam:
certs:
database: