-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
64 lines (60 loc) · 1.68 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
version: '3'
networks:
rademade-code:
proxy:
external:
name: proxy
services:
app:
image: registry.demo-rademade.com/rademade-code:latest
networks:
- rademade-code
environment:
POSTGRES_DB: rademade-code_production
POSTGRES_USER: rademade-code
POSTGRES_HOST: rademade-code_db
SECRET_KEY_BASE: 12f15c62c02ab253b02de4a0f9df307220659787b3d75ec0904378b01edd98ae474f19fb865a3ed1802ecc82335fdcc432081f4dfcd5d2b1a881a07bd9298f03
RAILS_LOG_TO_STDOUT: 'true'
volumes:
- /var/volume/projects/rademade-code/static:/app/static
deploy:
replicas: 1
placement:
constraints:
- node.role == manager
nginx:
image: nginx:stable
networks:
- rademade-code
- proxy
volumes:
- /var/volume/projects/rademade-code/static:/static
- /var/volume/projects/rademade-code/nginx.conf:/etc/nginx/nginx.conf
depends_on:
- rademade-code_app
deploy:
replicas: 1
labels:
- "traefik.port=80"
- "traefik.docker.network=proxy"
- "traefik.frontend.rule=Host:code.demo-rademade.com"
- "traefik.backend=rademade-code_nginx"
- "traefik.frontend.entryPoints=http,https"
- "traefik.acme.domains=code.demo-rademade.com"
placement:
constraints:
- node.role == manager
db:
image: postgres:9.6
networks:
- rademade-code
environment:
POSTGRES_DB: "rademade-code_production"
POSTGRES_USER: "rademade-code"
volumes:
- /var/volume/projects/rademade-code/dbdata:/var/lib/postgresql/data
deploy:
replicas: 1
placement:
constraints:
- node.role == manager