-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
80 lines (78 loc) · 1.94 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
version: "3"
services:
app:
build:
context: .
command: bash -c "rm -f tmp/pids/server.pid && bundle exec rails s -p 3000 -b '0.0.0.0'"
# Best way to store sensentive values in env
# env_file: .env
environment:
- REDIS_URL=redis://redis:6379/1
- RAILS_ENV=development
- DATABASE_HOST=postgres
- DATABASE_USER=postgres
- PARALLEL_WORKERS=1
volumes:
- .:/app
ports:
- "3000:3000"
depends_on:
- postgres
postgres:
image: postgres:13-alpine
command: ["postgres", "-c", "fsync=false", "-c", "full_page_writes=off"]
environment:
# Best way to store sensentive values in env
# env_file: .env
- DATABASE_HOST=postgres
- DATABASE_USER=postgres
- POSTGRES_HOST_AUTH_METHOD="trust"
- POSTGRES_PASSWORD=postgres
volumes:
- ./tmp/db:/var/lib/postgresql/data
ports:
- "5434:5432"
restart: always
sidekiq:
build:
context: .
command: bundle exec sidekiq --environment development -C config/sidekiq.yml
links:
- postgres
- redis
volumes:
- ../../:/myapp
# Best way to store sensentive values in env
# env_file: .env
environment:
- REDIS_URL=redis://redis:6379/1
- RAILS_ENV=development
- DATABASE_HOST=postgres
- DATABASE_USER=postgres
- PARALLEL_WORKERS=1
redis:
image: redis
volumes:
- ../../tmp/db:/var/lib/redis/data
# version: '3.8'
# services:
# db:
# image: postgres
# environment:
# POSTGRES_USER: postgres
# POSTGRES_PASSWORD: password
# volumes:
# - postgres:/var/lib/postgresql/data
# web:
# build: .
# command: bash -c "rm -f tmp/pids/server.pid && bundle exec rails s -p 3000 -b '0.0.0.0'"
# volumes:
# - .:/Rails-Docker
# ports:
# - "3000:3000"
# depends_on:
# - db
# environment:
# - RAILS_MASTER_KEY=this_would_be_the_key
# volumes:
# postgres: