-
Notifications
You must be signed in to change notification settings - Fork 42
/
docker-compose.yml
67 lines (67 loc) · 1.42 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
version: "3.7"
services:
app:
image: 127.0.0.1:5000/rubydoc-app
build:
context: .
dockerfile: ./docker/app/Dockerfile
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
- ./config:/app/config
- ./repos:/app/repos
- ./data:/app/data
- ./log:/app/log
deploy:
resources:
limits:
cpus: "6"
memory: 6G
replicas: 2
update_config:
order: start-first
depends_on:
- docparse
- db
db:
image: postgres:13-alpine
environment:
POSTGRES_USER: db
POSTGRES_PASSWORD: db
volumes:
- db:/var/lib/postgresql/data
deploy:
replicas: 1
update_config:
order: start-first
restart_policy:
condition: any
docparse:
image: 127.0.0.1:5000/rubydoc-docparse
build:
context: ./docker/docparse
entrypoint: sh -c "echo Docparse image is built. It is okay for this service to exit."
deploy:
replicas: 0
restart_policy:
condition: none
nginx:
image: nginx:alpine
volumes:
- ./config/nginx:/etc/nginx/templates:ro
- ./config/certs:/etc/nginx/certs:ro
- ./public:/public:ro
deploy:
replicas: 1
update_config:
order: start-first
ports:
- "0.0.0.0:80:80"
- "0.0.0.0:443:443"
depends_on:
- app
volumes:
db:
networks:
default:
driver: overlay
attachable: true