Work and fix docker-compose.yml
(1) Custom names in docker networks require compose file format to be at least 3.5 "Networks can also be given a custom name (since version 3.5)" @see: https://docs.docker.com/compose/networking/#specify-custom-networks (2) Add `traefik.enable=false` to the postgres Thus, traefik never tries to handle the container. (3) Bump traefik to 2.5.5 (4) Fix label of the portal Use prefix `traefik.http.services.portal`
This commit is contained in:
parent
076bc988df
commit
20378e0b03
1 changed files with 6 additions and 4 deletions
|
@ -1,4 +1,4 @@
|
|||
version: '3'
|
||||
version: '3.5'
|
||||
|
||||
networks:
|
||||
gateway:
|
||||
|
@ -15,7 +15,9 @@ services:
|
|||
POSTGRES_PASSWORD: obs
|
||||
POSTGRES_DB: obs
|
||||
volumes:
|
||||
- ./data/postgres/data:/var/lib/postgresql/data
|
||||
- ./data/postgres/data:/var/lib/postgresql/data
|
||||
labels:
|
||||
- traefik.enable=false
|
||||
|
||||
portal:
|
||||
image: openbikesensor-portal
|
||||
|
@ -34,13 +36,13 @@ services:
|
|||
- traefik.http.routers.portal.tls=true
|
||||
- traefik.http.routers.portal.tls.certresolver=leresolver
|
||||
- traefik.docker.network=gateway
|
||||
- traefik.http.services.whoami.loadbalancer.server.port=80
|
||||
- traefik.http.services.portal.loadbalancer.server.port=80
|
||||
networks:
|
||||
- gateway
|
||||
- backend
|
||||
|
||||
traefik:
|
||||
image: traefik:2.4.8
|
||||
image: traefik:2.5.5
|
||||
restart: always
|
||||
ports:
|
||||
- "80:80"
|
||||
|
|
Loading…
Add table
Reference in a new issue