-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
102 lines (93 loc) · 2.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
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
version: '3.4'
services:
app: &app
build:
context: .
dockerfile: ./Dockerfile
args:
PG_VERSION: '11'
NODE_VERSION: '11.8.0'
NODE_VERSION_MAJOR: '11'
YARN_VERSION: '1.13.0'
image: dip-rails:0.2.0
tmpfs:
- /tmp
environment: &app_env
RAILS_ENV: ${RAILS_ENV:-development}
HISTFILE: /bundle/.bash_history
MALLOC_ARENA_MAX: 2
networks:
default:
volumes:
- .:/app:cached
- rails_cache:/app/tmp/cache
- bundle:/bundle
- node_modules:/app/node_modules
- assets:/app/public/assets
- packs:/app/public/packs
- packs_test:/app/public/packs-test
- .docker/.bashrc:/root/.bashrc:ro
- .docker/.pryrc:/app/.pryrc:ro
- .docker/.psqlrc:/root/.psqlrc:ro
- postgres_history:/var/log/psql_history
backend: &backend
<<: *app
environment: &backend_env
<<: *app_env
REDIS_URL: redis://redis:6379/
SMTP_HOST: mail
DB_HOST: postgres
DB_USER: postgres
DB_PASSWORD: postgres
WEBPACKER_DEV_SERVER_HOST: webpack
depends_on:
- postgres
- redis
rails:
<<: *backend
command: bundle exec rails server -b 0.0.0.0
ports:
- ${WEB_PORT:-3000:3000}
webpack:
<<: *app
command: ./bin/webpack-dev-server
ports:
- ${WEBPACK_PORT:-3035:3035}
environment:
<<: *app_env
WEBPACKER_DEV_SERVER_HOST: 0.0.0.0
sidekiq:
<<: *backend
command: bundle exec sidekiq -q mailers -q default
postgres:
image: postgres:11.1
volumes:
- .docker/.psqlrc:/root/.psqlrc:ro
- postgres:/var/lib/postgresql/data
- postgres_history:/var/log/psql_history
ports:
- 5432
redis:
image: redis:3.2-alpine
volumes:
- redis:/data
ports:
- 6379
mail:
image: drujensen/mailcatcher:latest
ports:
- 1025
- ${MAIL_WEB_PORT:-1080:1080}
networks:
default:
volumes:
postgres:
postgres_history:
redis:
bundle:
node_modules:
assets:
rails_cache:
packs:
packs_test:
bash_history: