-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
79 lines (74 loc) · 2.31 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
68
69
70
71
72
73
74
75
76
77
78
79
version: '3.1'
services:
api:
image: "danslarue/homeless:latest"
restart: always
depends_on:
- db
deploy:
placement:
constraints:
- "node.labels.project==homeless"
labels:
- "traefik.enable=true"
- "traefik.http.routers.homeless-api.rule=Host(`homeless-api.project.lambla.eu`)"
- "traefik.http.routers.homeless-api.entrypoints=web"
- "traefik.http.routers.homeless-ssl-api.rule=Host(`homeless-api.project.lambla.eu`)"
- "traefik.http.routers.homeless-ssl-api.entrypoints=websecure"
- "traefik.http.services.homeless-api.loadbalancer.server.port=8099"
- "traefik.docker.network=traefik_traefik"
- "traefik.http.routers.homeless-ssl-api.tls=true"
- "traefik.http.routers.homeless-ssl-api.tls.certresolver=myresolver"
- "traefik.http.middlewares.test-redirectscheme.redirectscheme.scheme=https"
- "traefik.http.middlewares.test-redirectscheme.redirectscheme.permanent=true"
- "traefik.http.routers.homeless-api.middlewares=test-redirectscheme@docker"
networks:
#- homeless_private
- traefik_traefik
environment:
- COMPOSE_PROJECT_NAME=homeless
- PROFILE=prod
- db-password=example
db:
image: postgres:12
restart: always
environment:
- POSTGRES_PASSWORD=example
volumes:
- post:/var/lib/postgresql/data
deploy:
placement:
constraints:
- "node.labels.project==homeless"
networks:
- traefik_traefik
adminer:
image: adminer
restart: always
deploy:
placement:
constraints:
- "node.labels.project==homeless"
labels:
- "traefik.enable=true"
- "traefik.http.routers.adminer.entrypoints=web,websecure"
- "traefik.http.routers.adminer.rule=Host(`adminer.project.lambla.eu`)"
- "traefik.http.services.adminer.loadbalancer.server.port=8080"
- "traefik.docker.network=traefik_traefik"
networks:
#- homeless_private
- traefik_traefik
volumes:
post:
driver: local
driver_opts:
type: none
device: /home/dreaser/homeless/postgres/var/lib/postgresql/data
o: bind
networks:
# homeless_private:
# driver: overlay
# external: false
traefik_traefik:
driver: overlay
external: true