-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
118 lines (110 loc) · 2.73 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
version: '3.6'
networks:
network:
services:
'dnsmasq':
restart: on-failure
image: andyshinn/dnsmasq
ports:
- '53:53/udp'
- '53:53/tcp'
volumes:
- ./docker/dnsmasq/dnsmasq.conf:/etc/dnsmasq.conf:ro
- ./docker/dnsmasq/hosts:/etc/hosts:ro
- ./docker/dnsmasq/resolv.conf:/etc/resolv.conf:ro
cap_add:
- NET_ADMIN
'haproxy':
restart: on-failure
image: haproxy:alpine
networks:
- network
depends_on:
- app
- browser-sync
- mongo
- mongo-express
ports:
- '80:80'
- '443:443'
volumes:
- ./docker/haproxy:/usr/local/etc/haproxy:ro
'mongo':
container_name: mongo
restart: on-failure
image: mongo:latest
logging:
driver: none
environment:
- 'MONGODB_USER=user'
- 'MONGODB_PASS=pass'
networks:
- network
command: mongod --smallfiles
volumes:
- ./docker/mongo/db:/data/db
'mongo-express':
container_name: mongo-express
restart: on-failure
image: mongo-express
logging:
driver: none
networks:
- network
depends_on:
- mongo
ports:
- '8081:8081'
'browser-sync':
container_name: browser-sync
restart: on-failure
image: ustwo/browser-sync
logging:
driver: none
networks:
- network
depends_on:
- app
ports:
- '8002:8002'
volumes:
- ./docker/browser-sync/bs-config.js:/var/browser-sync/bs-config.js:ro
- ./dst:/var/browser-sync/dst:ro
working_dir: /var/browser-sync
command: start --config bs-config.js
# 'webpack': # generates `./node_modules`, watches and builds files
# container_name: webpack
# restart: on-failure
# image: node:alpine
# volumes:
# - ./dst:/var/webpack/dst
# - ./src:/var/webpack/src:ro
# - ./node_modules:/var/webpack/node_modules
# - ./docker/webpack/webpack.config.js:/var/webpack/webpack.config.js:ro
# - ./package.json:/var/webpack/package.json:ro
# - ./yarn.lock:/var/webpack/yarn.lock:ro
# working_dir: /var/webpack
# command: yarn install && yarn .wwebpack
'app':
container_name: app
restart: on-failure
image: keymetrics/pm2:latest-alpine
networks:
- network
depends_on:
- mongo
extra_hosts:
- 'langue.link:172.17.0.1'
- 'www.langue.link:172.17.0.1'
volumes:
- ./dst:/var/app/dst:ro
- ./node_modules:/var/app/node_modules:ro
- ./docker/app/ecosystem.config.js:/var/app/ecosystem.config.js:ro
working_dir: /var/app
command: pm2-runtime start ecosystem.config.js --only development
secrets:
- source: .keys.json
target: /var/app/.secret/.keys.json
secrets:
.keys.json:
file: ./.secret/.keys.json