-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
40 lines (38 loc) · 898 Bytes
/
docker-compose.yml
File metadata and controls
40 lines (38 loc) · 898 Bytes
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
version: '3'
services:
redis:
image: "redis:alpine"
restart: always
command: ["redis-server", "--appendonly", "yes"]
hostname: redis
volumes:
- ./db/redis:/data
ports:
- 6380:6379
db:
image: postgres
restart: always
env_file:
- dev.vars
volumes:
- ./db/postgres:/var/lib/postgresql/data
ports:
- 55432:5432
api:
restart: always
build: .
environment:
- RAILS_SERVE_STATIC_FILES=true
env_file:
- dev.vars
command: bash -c "rm -rf /myapp/tmp/pids/server.pid; bundle exec rake db:create && rake db:migrate && bundle exec rake production:bootstrap && bundle exec rake assets:precompile && bundle exec rails s -p 3030 -b '0.0.0.0'"
depends_on:
- redis
- db
volumes:
- shared-volume:/etc/mimo
- .:/myapp
ports:
- 3000:3030
volumes:
shared-volume: