-
Notifications
You must be signed in to change notification settings - Fork 1.8k
/
Copy pathdocker-compose.yml
41 lines (41 loc) · 987 Bytes
/
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
version: "2"
services:
db:
image: mariadb:10.2
network_mode: "service:web"
environment:
- MYSQL_DATABASE=plots
- MYSQL_USER=plots
- MYSQL_PASSWORD=plots
- MYSQL_RANDOM_ROOT_PASSWORD=true
volumes:
- ./config/my.cnf:/etc/mysql/my.cnf
# for configuration
- ../mysql:/var/lib/mysql
# for persistence
- ../dump:/docker-entrypoint-initdb.d
# for importing a dump
# if you want to re-import simply put away ../mysql/*
redis:
image: redis:latest
web:
build: .
command: /bin/bash -c "sleep 5 && passenger start -p 4000"
environment:
- RAILS_ENV=${RAILS_ENV}
- SECRET_KEY_BASE=${SECRET_KEY_BASE}
volumes:
- .:/app
ports:
- "127.0.0.1:4000:4000"
restart: unless-stopped
sidekiq:
build: .
command: bundle exec sidekiq
depends_on:
- db
- redis
volumes:
- .:/app
environment:
- JOB_WORKER_URL=redis://redis:6379/0