-
Notifications
You must be signed in to change notification settings - Fork 45
Expand file tree
/
Copy pathdocker-compose.prod.yml
More file actions
74 lines (74 loc) · 1.78 KB
/
docker-compose.prod.yml
File metadata and controls
74 lines (74 loc) · 1.78 KB
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
services:
web:
image: 127.0.0.1:5000/docmeta/rubydoc-app
build:
context: .
dockerfile: ./docker/app/Dockerfile
environment:
RAILS_MAX_THREADS: 2
WEB_CONCURRENCY: 14
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./config/master.key:/app/config/master.key
- ./config/credentials.yml.enc:/app/config/credentials.yml.enc
- ./storage:/app/storage
ports:
- "0.0.0.0:80:80"
deploy:
replicas: 2
update_config:
order: start-first
healthcheck:
test: [ "CMD", "curl", "-f", "http://localhost/healthcheck" ]
start_period: 1s
interval: 30s
timeout: 30s
retries: 3
depends_on:
- db
jobs:
image: 127.0.0.1:5000/docmeta/rubydoc-app
build:
context: .
dockerfile: ./docker/app/Dockerfile
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./config/master.key:/app/config/master.key
- ./config/credentials.yml.enc:/app/config/credentials.yml.enc
- ./storage:/app/storage
environment:
RAILS_MAX_THREADS: 10
DOCPARSE_MAX_BUILDS: 8
entrypoint: [ "./bin/jobs", "start" ]
deploy:
replicas: 1
update_config:
order: start-first
depends_on:
- db
db:
image: postgres:alpine
command: -N 500 -B 240MB
environment:
POSTGRES_USER: db
POSTGRES_PASSWORD: db
volumes:
- db1:/var/lib/postgresql/data
deploy:
replicas: 1
update_config:
order: start-first
restart_policy:
condition: on-failure
healthcheck:
test: [ "CMD", "pg_isready", "-U", "db" ]
start_period: 0s
interval: 30s
timeout: 10s
retries: 3
volumes:
db1:
networks:
default:
driver: overlay
attachable: true