-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathdocker-compose.yml
83 lines (75 loc) · 1.97 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
version: '3.9'
x-web-environment: &web-environment
RAILS_SECRET_KEY_BASE: 44a599292ee918ca52c5060bb73b9a5b754628d6d67c64d0066c2ecf25381ef67b2b7a9981332316cc09e0a4bdbd08f07b7a9277d77fd4b4f2a39a488860c18c
DATABASE_HOST: db
DATABASE_USERNAME: postgres
DATABASE_PASSWORD: postgres
BUNDLE_PATH: /bundle_cache
GEM_HOME: /bundle_cache
GEM_PATH: /bundle_cache
RAILS_WORKERS_COUNT: 0
RAILS_THREADS_COUNT: 10
SIDEKIQ_CONCURRENCY: 1
RAILS_PORT: 7001
RAILS_ENV: development
ALLOWED_HOSTS: lvh.me,.lvh.me,lvh.me:1313,.lvh.me:1313,lvh.me:7001,.lvh.me:7001,localhost,.ngrok.io,localhost:3000,web
REDIS_URL: redis://redis
APP_URL: http://web:7001
RUBYGEMS_API_KEY: ${RUBYGEMS_API_KEY}
services:
web:
build: .
environment: *web-environment
env_file:
- .env
volumes: &web-volumes
- &app-volume .:/app:cached
- ~/.ssh:/root/.ssh
- &bash-history ~/.bash_history:/root/.bash_history
- &bundle-cache-volume bundle_cache:/bundle_cache
ports:
- 7001:7001
depends_on:
- db
command: bash -c "bundle install && bundle exec rails db:create db:migrate && bundle exec puma -C config/puma.rb"
core:
build: core
environment: *web-environment
env_file:
- .env
volumes:
- ./core:/gem:cached
- *bash-history
- *bundle-cache-volume
depends_on:
- db
command: bash -c "bundle install && bundle exec rails db:create db:migrate"
db:
image: postgres:11.4
ports:
- 5432:5432
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
sidekiq:
build: .
environment: *web-environment
env_file:
- .env
volumes: *web-volumes
depends_on:
- redis
- web
command: bash -c "bundle exec sidekiq -C /app/config/sidekiq.yml"
redis:
image: redis
bundle_cache:
image: busybox
volumes:
- *bundle-cache-volume
volumes:
bundle_cache:
core:
networks:
default:
name: 'uffizzi_default_network'