forked from mimolabs/mimo-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
113 lines (106 loc) · 2.78 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
version: '3'
services:
redis:
image: "redis:alpine"
restart: always
command: ["redis-server", "--appendonly", "yes"]
hostname: redis
volumes:
- ./db/redis:/data
db:
image: postgres
restart: always
env_file:
- production.vars
volumes:
- ./db/postgres:/var/lib/postgresql/data
nginx:
restart: always
container_name: nginx
labels:
- com.github.jrcs.letsencrypt_nginx_proxy_companion.nginx_proxy
image: 'nginx:alpine'
ports:
- "80:80"
- "443:443"
depends_on:
- db
volumes:
- 'nginx-config:/etc/nginx/conf.d'
- 'nginx-certs:/etc/nginx/certs'
- 'nginx-vhosts:/etc/nginx/vhost.d'
- 'nginx-webroot:/usr/share/nginx/html'
nginx-gen:
build: ./docker-gen/
container_name: nginx-docker-gen
restart: always
labels:
- com.github.jrcs.letsencrypt_nginx_proxy_companion.docker_gen
volumes:
- 'nginx-config:/etc/nginx/conf.d'
- 'nginx-certs:/etc/nginx/certs'
- 'nginx-vhosts:/etc/nginx/vhost.d'
- 'nginx-webroot:/usr/share/nginx/html'
- '/var/run/docker.sock:/tmp/docker.sock:ro'
depends_on:
- nginx
command: -notify-sighup nginx -watch -wait 5s:30s /etc/docker-gen/templates/nginx.tmpl /etc/nginx/conf.d/default.conf
api:
restart: always
image: "ohmimo/mimo-api:latest"
env_file:
- production.vars
- api.vars
command: bash -c "bundle exec rake db:create && bundle exec rake db:migrate && bundle exec rake production:bootstrap && bundle exec rake assets:precompile && bundle exec puma -C /myapp/config/puma.rb"
depends_on:
- redis
- db
- nginx
volumes:
- shared-volume:/etc/mimo
dashboard:
restart: always
image: "ohmimo/mimo-frontend"
env_file:
- production.vars
- dashboard.vars
environment:
- NODE_ENV=production
volumes:
- shared-volume:/etc/mimo
depends_on:
- api
command: bash -c "cd /opt/app && ./wait-for-it.sh && grunt build && node /opt/app/dist/server/app.js"
splash:
restart: always
image: "ohmimo/mimo-splash-dev"
env_file:
- splash.vars
environment:
- NODE_ENV=production
volumes:
- shared-volume:/etc/mimo
depends_on:
- api
command: bash -c "cd /opt/app && ./wait-for-it.sh && grunt build && node /opt/app/dist/server/app.js"
worker:
restart: always
image: "ohmimo/mimo-worker"
env_file:
- production.vars
environment:
# - RAILS_LOG_TO_STDOUT=true
# - RAILS_SERVE_STATIC_FILES=true
- REDIS_HOST=redis
volumes:
- shared-volume:/etc/mimo
depends_on:
- db
- redis
command: bash -c "sidekiq"
volumes:
shared-volume:
nginx-config:
nginx-certs:
nginx-vhosts:
nginx-webroot: