-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdocker-compose.yml
56 lines (50 loc) · 1.26 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
# vim: ts=2 sts=2 sw=2 et:
version: '2'
services:
traefik:
image: traefik
command: --web --docker --docker.domain=passwords.localhost --logLevel=DEBUG
ports:
- "80:80"
- "8080:8080"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /dev/null:/traefik.toml
depends_on:
- passwords-svc
passwords-db:
image: mongo
passwords-svc:
build: ./passwords
command: python serve.py
labels:
- "traefik.backend=service"
- "traefik.frontend.rule=Host:service.passwords.localhost"
links:
- passwords-db
ports:
- "5000"
volumes:
- ./passwords:/code
environment:
PASSWORD_SECRET: "vgauiLoEurnGEkKrnWk9RkE7jegAGB7zsgjipmv375C9xBAi1x0Dgv7rZHJFOxVA"
KEY_SECRET: "rGkVhNBbuv6LtFzrPOrFwJmzilYajN2Cm8qrWWz9ztkoU2iPClq4DjkO5B19hBG5"
WORK_FACTOR: "12"
db:
image: postgres
web:
build: ./web
command: bash -c "sleep 5 && ./manage.py migrate && ./manage.py runserver 0.0.0.0:8000"
volumes:
- ./web:/code
ports:
- "8000"
labels:
- "traefik.backend=web"
- "traefik.frontend.rule=Host:web.passwords.localhost"
links:
- db
- passwords-svc
- traefik:service.passwords.localhost
depends_on:
- db