-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
48 lines (43 loc) · 1.07 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
services:
db:
image: postgres
container_name: db
volumes:
- ./backend/init.sql:/docker-entrypoint-initdb.d/init.sql
- ./backend/db/data:/var/lib/postgresql/data
environment:
- POSTGRES_PASSWORD=password
ports:
- "5432:5432"
command: postgres -c "log_statement=all"
backend: &backend
image: ruby
container_name: labs-backend
volumes:
- ./backend:/app
- rubygems:/usr/local/bundle
working_dir: /app
environment:
- REDIS_URL=redis://redis:6379/0
ports:
- "3000:3000"
command: bash -c "bundle install && ruby app/lab_server.rb -o 0.0.0.0"
sidekiq:
<<: *backend
container_name: jobs
ports: []
command: bash -c "bundle install && sidekiq -r ./lib/jobs/import_csv_job.rb"
frontend:
image: ruby
container_name: labs-frontend
volumes:
- ./frontend:/app
- rubygems:/usr/local/bundle
working_dir: /app
ports:
- "4000:4000"
command: bash -c "bundle install && ruby server.rb -o 0.0.0.0"
redis:
image: redis
volumes:
rubygems: