-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
43 lines (41 loc) · 1.07 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
version: "2"
services:
cents:
restart: always
image: "node:8-alpine"
user: "node"
working_dir: /app
environment:
- NODE_ENV=production
- COOKIE_SECRET
- PORT
- SessionStore
volumes:
- ./dist:/app/dist
- ./serviceWorker:/app/serviceWorker
- ./service:/app/service
- ./node_modules:/app/node_modules
- ./accounts.json:/app/accounts.json
- ./diffs.log:/app/diffs.log
command: "node dist/server"
expose:
- "${PORT}"
#this allows rolling updates
# https://medium.com/@slavakorolev/zero-downtime-deployment-with-docker-d9ef54e48c4
# https://github.com/korolvs/kidsboards/blob/2bcbd4057443be7500707b525843ec2bd8dd87f5/docker-compose.yml
# https://github.com/docker/dockercloud-haproxy/tree/master
haproxy:
image: dockercloud/haproxy
container_name: cents_haproxy
links:
- cents
depends_on:
- cents
volumes:
- /var/run/docker.sock:/var/run/docker.sock
ports:
- "${PORT}:80"
networks:
default:
external:
name: infrastructure_default