-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
55 lines (50 loc) · 1.14 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
services:
db:
image: postgres:latest
environment:
POSTGRES_DB: my_database
POSTGRES_USER: my_user
POSTGRES_PASSWORD: my_password
ports:
- "5432:5432"
volumes:
- ./server/setup.sql:/docker-entrypoint-initdb.d/setup.sql
container_name: exams-db
server: &server
build: .
command: bash -c 'bundle install && ruby server.rb'
volumes:
- ./server:/app
- bundle_data_server:/usr/local/bundle
- temp_data:/tmp
ports:
- "3000:3000"
depends_on:
- db
environment:
- REDIS_URL=redis://redis:6379/0
container_name: exams-server
app:
build: ./app
command: bash -c 'bundle install && ruby app.rb'
volumes:
- ./app:/app
- bundle_data_app:/usr/local/bundle
ports:
- "4000:4000"
depends_on:
- server
container_name: exams-app
sidekiq:
<<: *server
container_name: exams-sidekiq
ports: []
command: bash -c 'gem install bundler && bundle install && sidekiq -r ./jobs/import_job.rb'
depends_on:
- redis
redis:
image: redis
volumes:
bundle_data_server:
bundle_data_app:
temp_data: