This repository has been archived by the owner on Nov 15, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
docker-compose-local.yml
executable file
·75 lines (68 loc) · 1.87 KB
/
docker-compose-local.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
version: '2.2'
services:
redis-srv:
image: 'redis:5-alpine'
command: redis-server
ports:
- '127.0.0.1:6379:6379'
volumes:
- 'vol_redis:/data'
db-srv:
image: postgres:9.5.17
volumes:
- pgdata:/var/lib/postgresql/data
- '../private/db/developpement/init.sql:/docker-entrypoint-initdb.d/init.sql'
- "../private/db/latest.dump:/latest.dump"
ports:
- '5432:5432'
environment:
POSTGRES_HOST_AUTH_METHOD: "trust"
web-srv:
build:
context: .
dockerfile: dockerfile_rails_local
command: >
bash -c "[ ! -e /railsapp/tmp/pids/server.pid ] || rm /railsapp/tmp/pids/server.pid
&& bundle check || bundle install
&& bin/rails minidb:ensure_minimalistic_data
&& R7_MODE=true COVERAGE_PLEASE=true RAILS_ENV=development bin/rails s -p 3000 -b '0.0.0.0'"
volumes:
- "../private/env/developpement/.env:/railsapp/.env"
- './rails:/railsapp'
- bundle:/usr/local/bundle
- node_modules:/railsapp/node_modules
ports:
- '127.0.0.1:3000:3000'
environment:
ARA_DATABASE_HOST: "db-srv"
ARA_DATABASE_USER: "ara"
ARA_DATABASE_NAME: "ara_dev"
REDIS_URL: "redis://redis-srv:6379/1"
depends_on:
- db-srv
- redis-srv
sidekiq-srv:
build:
context: .
dockerfile: dockerfile_rails_local
depends_on:
- 'db-srv'
- 'redis-srv'
- 'web-srv'
command: >
bash -c "bundle exec sidekiq"
volumes:
- "../private/env/developpement/.env:/railsapp/.env"
- './rails:/railsapp'
- bundle:/usr/local/bundle
- '/railsapp/tmp' # don't mount tmp directory
environment:
ARA_DATABASE_HOST: "db-srv"
ARA_DATABASE_USER: "ara"
ARA_DATABASE_NAME: "ara_dev"
REDIS_URL: "redis://redis-srv:6379/1"
volumes:
bundle:
pgdata:
vol_redis:
node_modules: