-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
65 lines (56 loc) · 1.5 KB
/
docker-compose.yml
File metadata and controls
65 lines (56 loc) · 1.5 KB
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
#- Docker Compose file
#- docker-compose.yml ~~
# ~~ (c) SRW, 18 Apr 2018
# ~~ last updated 20 Apr 2018
version: "3"
services:
db:
image: postgres:9.5
environment:
POSTGRES_USER: user
POSTGRES_PASSWORD: pass
networks:
- webnet
deploy:
placement:
constraints: [node.role == manager]
web:
image: qmachine/qm-ruby-turnkey:latest
deploy:
replicas: 2
restart_policy:
condition: on-failure
resources:
limits:
cpus: "0.1"
memory: 50M
# The "ports" definition dictates what port the app will load in from my
# laptop's native browser.
ports:
- "80:8177"
networks:
- webnet
environment:
# It turns out that the hostname, "db", is taken from the name of the
# Postgres service, so if you change that, you must change the URL below.
DATABASE_URL: "postgres://user:pass@db:5432/user"
PORT: 8177
WEB_CONCURRENCY: 1
depends_on:
- db
# This part is just pasted in from the tutorial because it definitely helps me
# figure out what is going on while debugging :-)
visualizer:
image: dockersamples/visualizer:stable
ports:
- "8080:8080"
volumes:
- "/var/run/docker.sock:/var/run/docker.sock"
deploy:
placement:
constraints: [node.role == manager]
networks:
- webnet
networks:
webnet:
#- vim:set syntax=yaml: