-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgeneric.docker-compose.yml
52 lines (39 loc) · 1.39 KB
/
generic.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
version: "3.3"
# Alter:
# service-name
# image-name
# environment
# networks
# volumes
# db?
# # labels:
# host-rules
# router-name (any, uniq)
# cert-resolver-name (uniq)
# container-port
services:
service-name:
image: image-name
environment:
labels:
- traefik.enable=true
- traefik.docker.network=proxy
# # http access
- traefik.http.routers.router-name.rule=Host(host-rules)
- traefik.http.routers.router-name.entrypoints=web
# # https access
- traefik.http.routers.router-name-websecure.rule=Host(host-rules)
- traefik.http.routers.router-name-websecure.entrypoints=websecure
- traefik.http.routers.router-name-websecure.tls=true
# # Specify to container port
- traefik.http.routers.router-name-websecure.service=router-name-service
- traefik.http.routers.router-name.service=router-name-service
- traefik.http.services.router-name-service.loadbalancer.server.port=container-port
# # redirect http to https
- traefik.http.middlewares.router-name-redirect-to-websecure.redirectscheme.scheme=https
- traefik.http.routers.router-name.middlewares=router-name-redirect-to-websecure
# # certResolver for when certificate through traefik needed (see traefik.yml)
- traefik.http.routers.router-name-websecure.tls.certResolver=cert-resolver-name
restart: always
volumes:
networks: