-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-freight.yml
83 lines (77 loc) · 1.55 KB
/
docker-compose-freight.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
version: '3'
volumes:
freight_database_volume:
freight_redis_volume:
networks:
default-net:
driver: bridge
external: true
services:
freight_database:
image: postgres
networks:
- default-net
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
restart: unless-stopped
volumes:
- freight_database_volume:/var/lib/postgresql/data
ports:
- 5432
freight_service:
build:
context: ./freight_service
dockerfile: Dockerfile
networks:
- default-net
environment:
- RAILS_ENV=development
volumes:
- ./freight_service:/freight_service
ports:
- 1005:3000
links:
- freight_database
- freight_consumer
- freight_redis
depends_on:
- freight_database
- freight_consumer
- freight_redis
stdin_open: true
tty: true
command:
- /bin/sh
- -c
- |
rm -rf tmp/pids
rails db:migrate db:seed
rails server -b 0.0.0.0 -p 3000
freight_consumer:
build:
context: ./freight_service
dockerfile: Dockerfile
networks:
- default-net
links:
- freight_redis
environment:
- RAILS_ENV=development
volumes:
- ./freight_service:/freight_service
stdin_open: true
tty: true
command:
- /bin/sh
- -c
- |
bundle exec racecar CalculateFreightConsumer
freight_redis:
image: redis:latest
ports:
- 6379
networks:
- default-net
volumes:
- freight_redis_volume:/data