-
Notifications
You must be signed in to change notification settings - Fork 7
/
docker-compose.production.yml
71 lines (63 loc) · 1.57 KB
/
docker-compose.production.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
version: '2.0'
services:
db:
image: mysql:8.0
command: --default-authentication-plugin=mysql_native_password
environment:
MYSQL_RANDOM_ROOT_PASSWORD: 'yes'
MYSQL_USER: resourcemap
MYSQL_PASSWORD: resourcemap
MYSQL_DATABASE: resourcemap
volumes:
- db:/var/lib/mysql
elasticsearch:
image: elasticsearch:1.7
command: elasticsearch -Des.network.host=0.0.0.0
volumes:
- elastic:/usr/share/elasticsearch/data
redis:
image: redis:4.0-alpine
volumes:
- redis:/data
smtp:
image: 'djfarrelly/maildev:latest'
command: 'bin/maildev --web 3080 --smtp 1025 --incoming-user smtp --incoming-pass smtp'
ports:
- '3080:3080'
web: &app
image: instedd/resourcemap:dockerfile
environment:
RAILS_ENV: production
ELASTICSEARCH_URL: 'elasticsearch:9200'
REDIS_URL: 'redis://redis:6379'
DATABASE_URL: 'mysql2://resourcemap:resourcemap@db:3306/resourcemap'
SETTINGS__HOST: 'localhost:4000'
NGINX_PORT: 4000
SETTINGS__SMTP__ADDRESS: smtp
SETTINGS__SMTP__PASSWORD: smtp
SETTINGS__SMTP__PORT: 1025
SETTINGS__SMTP__USER_NAME: smtp
env_file: ./docker-env
pid: host
volumes:
- uploads:/app/public/uploads
depends_on:
- db
- elasticsearch
- redis
- smtp
ports:
- 4000:4000
resque:
<<: *app
command: rake resque:work TERM_CHILD=1 FORK_PER_JOB=false
ports: []
resque_scheduler:
<<: *app
command: rake resque:scheduler
ports: []
volumes:
db:
elastic:
redis:
uploads: