-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
64 lines (59 loc) · 1.35 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
version: "3"
volumes:
travel-app-postgres:
travel-app-redis:
travel-app-gem-bundle:
services:
app:
container_name: travel-app
image: travel-app-ruby-env
volumes:
- .:/app
- travel-app-gem-bundle:/usr/local/bundle
working_dir: /app
environment:
- DATABASE_URL=postgres://postgres@db:5432/postgres?sslmode=disable
- REDIS_ADDRESS=redis:6379
- ENVIRONMENT=development
command: /bin/bash -c "bundle install
&& yarn install
&& rake db:migrate
&& rails s -p 5000 -b 0.0.0.0"
ports:
- "5000:5000"
depends_on:
- db
- redis
- webpack
links:
- db
- redis
- webpack
webpack:
container_name: travel-app-webpack
image: travel-app-ruby-env
volumes:
- .:/app
- travel-app-gem-bundle:/usr/local/bundle
working_dir: /app
environment:
- ENVIRONMENT=development
command: /bin/bash -c "yarn install
&& ./bin/webpack-dev-server"
ports:
- "5001:3035"
db:
container_name: travel-app-db
image: postgres:10.6
volumes:
- travel-app-postgres:/var/lib/postgresql/data
ports:
- "5440:5432"
redis:
image: redis:alpine
container_name: travel-app-redis
command: [ redis-server, --appendonly, "yes" ]
volumes:
- travel-app-redis:/data
ports:
- "6301:6380"