-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
87 lines (81 loc) · 1.71 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
version: "3.8"
x-shared-config: &shared-config
# Comment previous line and uncomment following lines to recompile docker image
build:
context: .
dockerfile: ./docker/Dockerfile
args:
BUNDLER_VERSION: "1.17.3"
NODE_MAJOR: "12"
RUBY_VERSION: "2.6.5"
tmpfs:
- /tmp
stdin_open: true
tty: true
volumes:
- .:/website:cached
- ./docker/.bashrc:/root/.bashrc:ro
- ./docker/.irbrc:/root/.irbrc:ro
- ./docker/.psqlrc:/root/.psqlrc:ro
- base_cache_rails:/app/tmp/cache
- base_gems:/usr/src/gems
- base_packs:/website/public/packs
env_file:
- ./docker/postgres/.env
- ./docker/.env
environment:
- POSTGRES_HOST=postgres
depends_on:
- postgres
- redis
- sidekiq
services:
website:
<<: *shared-config
command: bash -c "rm -f tmp/pids/server.pid && bundle install && bundle exec rails s -b '0.0.0.0'"
ports:
- 3000:3000
- 4000:4000
networks:
- gateway
environment:
SELENIUM_REMOTE_URL: http://chrome:3333/wd/hub
volumes:
- '.:/website'
sidekiq:
image: trader-app_website
command: bundle exec sidekiq -C config/sidekiq.yml
env_file:
- ./docker/.env
volumes:
- '.:/website'
depends_on:
- redis
networks:
- gateway
postgres:
image: postgres:13.4-alpine
ports:
- 5432:5432
env_file:
- ./docker/postgres/.env
volumes:
- postgres:/var/lib/postgresql/data
networks:
- gateway
redis:
image: redis:5.0.3-alpine
ports:
- "6379:6379"
volumes:
- redis:/data
networks:
- gateway
volumes:
base_cache_rails:
base_gems:
base_packs:
postgres:
redis:
networks:
gateway: {}