-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
52 lines (50 loc) · 1.29 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
version: '3.8'
services:
web:
build: .
ports:
- "3001:3001"
volumes:
- .:/app
environment:
- SIDEKIQ_USERNAME=admin
- SIDEKIQ_PASSWORD=123456
- RAILS_ENV=development
- REDIS_URL=redis://redis:6379/0
- DATABASE_URL=postgresql://postgres:example@db:5432/app_development
- SECRET_KEY_BASE=816011313c3963c5d79a619bcf8de8b9399f181de53bf7e563f583162ae484b961470ef59224796254111383a8956e19496b75d0ab1d96541e9b037602bbebec
- AUTH_SECRET=3b787120af4ff7a12839d58a07d96349da9f9f1bdbdd92097d5d72f4083f6183bb3c7c848ddc8b5d474007e717b39d75da193e25b101d099bc9544dfd8fbe572
depends_on:
- db
- redis
command:
- /bin/sh
- -c
- |
rm -rf ./tmp/pids/server.pid
bundle exec rails db:migrate
bundle exec rails s -b 0.0.0.0 -p 3001
redis:
image: redis:latest
ports:
- "6379:6379"
sidekiq:
build: .
command: bundle exec sidekiq
volumes:
- .:/app
environment:
- RAILS_ENV=development
- REDIS_URL=redis://redis:6379/0
depends_on:
- db
- redis
db:
image: postgres:latest
restart: always
ports:
- "5432:5432"
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: example
POSTGRES_DB: app_development