-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose.yml
115 lines (101 loc) · 2.12 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
114
115
version: '3.4'
services:
app: &app
build:
context: .
dockerfile: ./.docker/development/app/Dockerfile
args:
RUBY_VERSION: '2.6.3'
BUNDLER_VERSION: '2.0.2'
NODE_MAJOR: '11'
YARN_VERSION: '1.17.3'
image: hra_calculator_app:dev-0.1.0
tmpfs:
- /tmp
networks:
- local
web: &web
build:
context: .
dockerfile: ./.docker/development/web/Dockerfile
image: hra_calculator_web:dev-0.1.0
tmpfs:
- /tmp
networks:
- local
backend: &backend
<<: *app
stdin_open: true
tty: true
volumes:
- .:/app:cached
- rails_cache:/app/tmp/cache
- bundle:/bundle
- node_modules_app:/app/node_modules
- packs:/app/public/packs
environment:
- RAILS_ENV=${RAILS_ENV:-development}
- REDIS_URL=redis://redis:6379/
- BOOTSNAP_CACHE_DIR=/bundle/bootsnap
- WEB_CONCURRENCY=1
- HISTFILE=/app/log/.bash_history
- EDITOR=vi
depends_on:
- mongo
- redis
runner:
<<: *backend
command: /bin/bash
ports:
- '3002:3002'
frontend: &frontend
<<: *web
command: bash -c "npm install && ng serve --host 0.0.0.0 --port 4200"
volumes:
- node_modules_web:/app/node_modules
environment:
- NODE_ENV=development
- WEB_CONCURRENCY=1
- HISTFILE=/app/log/.bash_history
- EDITOR=vi
angular:
<<: *frontend
ports:
- '4200:4200'
volumes:
- "./clients/html:/app"
rails:
<<: *backend
stdin_open: true
tty: true
command: bash -c "rm -f tmp/pids/server.pid && bundle && yarn install --check-files && bundle exec puma -C config/puma.rb"
ports:
- '3000:3000'
mongo:
image: mongo:4.2
volumes:
- mongodb:/data/db
- mongodb_config:/data/configdb
ports:
- 27017
networks:
- local
redis:
image: redis:3.2-alpine
volumes:
- redis:/data
ports:
- 6379
networks:
- local
volumes:
redis:
bundle:
node_modules_app:
node_modules_web:
packs:
rails_cache:
mongodb:
mongodb_config:
networks:
local: