-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
69 lines (63 loc) · 1.67 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
version: '3'
services:
backend:
image: node:12
depends_on:
- db_auth
- db_data
# restart: always ## only for prod
volumes:
- ./:/usr/src/app
- ./node_modules:/usr/src/app/node_modules
- ./dist:/usr/src/app/dist
working_dir: /usr/src/app
command: sh -c 'npm run dev'
environment:
- VIRTUAL_HOST=localhost # Enviroment variable needed for nginx proxy
# - LETSENCRYPT_HOST=localhost # Enviroment variables needed for Let's Encrypt companion
# - LETSENCRYPT_EMAIL=pfouque@gmail.com
ports:
- "8080:80"
- "8443:8443"
networks:
- nginx-proxy
logging:
driver: json-file
options:
max-size: "10m"
db_auth:
image: redis
volumes:
- auth:/data
ports:
- "26379:6379"
networks:
- nginx-proxy
logging:
driver: json-file
options:
max-size: "10m"
db_data:
image: mysql:5
volumes:
- data:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: root
MYSQL_DATABASE: koatypescript
command:
- --max_allowed_packet=64M
ports:
- "23306:3306"
networks:
- nginx-proxy
logging:
driver: json-file
options:
max-size: "10m"
volumes:
auth:
data:
networks:
nginx-proxy:
external:
name: webproxy_nginx-proxy # Reference webproxy/nginx-proxy container network