-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
92 lines (82 loc) · 2.24 KB
/
Copy pathdocker-compose.yml
File metadata and controls
92 lines (82 loc) · 2.24 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
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
version: '3'
services:
traefik:
image: traefik:1.7.9
volumes:
- /var/run/docker.sock:/var/run/docker.sock
ports:
- '3000:80'
- '8888:8888'
command:
- --api
- --docker
- --defaultentrypoints=http
- --entryPoints=Name:http Address::80
postgres:
image: postgres:9.5
environment:
- POSTGRES_PASSWORD=mysecretpassword
- POSTGRES_USER=dungeon
volumes:
- sql-data:/var/lib/postgresql/data
redis:
image: redis:latest
restart: unless-stopped
nginx:
image: 'registry.elbert.us/dungeon:${IMAGE_TAG}'
restart: unless-stopped
volumes:
- images:/dungeon/public/images/
command: ["nginx", "-g", "daemon off;"]
labels:
traefik.enable: 'true'
traefik.docker.network: traefik
traefik.frontend.rule: 'Host:${HOSTNAME};PathPrefix:/assets/,/packs/,/images/,/favicon/,/favicon.ico,/robots.txt'
web1: &web
image: 'registry.elbert.us/dungeon:${IMAGE_TAG}'
build: .
restart: unless-stopped
environment:
- DB_MIGRATE=true
- RAILS_ENV=docker
- SECRET_KEY_BASE=${SECRET_KEY_BASE}
- DUNGEON_PG_HOST=${DUNGEON_PG_HOST}
- DUNGEON_PG_USER=${DUNGEON_PG_USER}
- DUNGEON_PG_PASSWORD=${DUNGEON_PG_PASSWORD}
- SMTP_USERNAME=${SMTP_USERNAME}
- SMTP_PASSWORD='${SMTP_PASSWORD}'
volumes:
- images:/dungeon/public/images/
- /var/log/dungeon:/dungeon/log/
links:
- redis
- postgres
labels:
traefik.enable: 'true'
traefik.docker.network: traefik
traefik.frontend.rule: 'Host:${HOSTNAME}'
worker:
image: 'registry.elbert.us/dungeon:${IMAGE_TAG}'
restart: unless-stopped
volumes:
- images:/dungeon/public/images/
- /var/log/dungeon:/dungeon/log/
environment:
- QUEUE=*
- INTERVAL=1.0
- RAILS_ENV=docker
- SECRET_KEY_BASE=${SECRET_KEY_BASE}
- DUNGEON_PG_HOST=${DUNGEON_PG_HOST}
- DUNGEON_PG_USER=${DUNGEON_PG_USER}
- DUNGEON_PG_PASSWORD=${DUNGEON_PG_PASSWORD}
- SMTP_USERNAME=${SMTP_USERNAME}
- SMTP_PASSWORD='${SMTP_PASSWORD}'
command: 'bundle exec rake resque:work'
links:
- redis
- postgres
volumes:
sql-data:
driver: local
images:
driver: local