-
Notifications
You must be signed in to change notification settings - Fork 7
/
docker-compose.yml
65 lines (64 loc) · 1.28 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
version: '3'
services:
redis:
image: redis:5
restart: always
networks:
- pek_network
postgres:
build:
context: .
dockerfile: PostgresDockerfile
environment:
- PGDATA=/var/lib/postgresql/data/pgdata
env_file:
- .env
volumes:
- database_folder:/var/lib/postgresql/data/pgdata
restart: always
networks:
- pek_network
sidekiq:
build: .
command: bundle exec sidekiq
environment:
- REDIS_URL=redis://redis:6379
restart: always
env_file:
- .env
depends_on:
- postgres
- redis
networks:
- pek_network
web:
build: .
command: sh -c "rm -f tmp/pids/server.pid && bundle exec rails s -p 3000 -b '0.0.0.0'"
environment:
- RAILS_SERVE_STATIC_FILES=true
- RAILS_ENV=production
- DATABASE_USER=postgres
- DATABASE_NAME=pek-next
- DATABASE_HOST=postgres
restart: always
env_file:
- .env
volumes:
- uploads_folder:/pek-next/public/uploads
ports:
- "3443:3000"
networks:
- pek_network
depends_on:
- postgres
- redis
networks:
pek_network:
# Add your volumes
volumes:
uploads_folder:
external:
name: pek_uploads
database_folder:
external:
name: pek_database