wip: traefik api
This commit is contained in:
parent
c076648662
commit
4cb2462dfb
5 changed files with 43 additions and 21 deletions
|
@ -1,6 +1,20 @@
|
|||
version: "3.7"
|
||||
|
||||
services:
|
||||
reverse-proxy:
|
||||
container_name: reverse-proxy
|
||||
image: traefik:v2.8
|
||||
restart: always
|
||||
ports:
|
||||
- ${NGINX_PORT-80}:80
|
||||
- ${PROXY_PORT-8080}:8080
|
||||
command: --api.insecure=true --providers.docker
|
||||
volumes:
|
||||
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||
- ${PWD}/traefik:/root/.config
|
||||
networks:
|
||||
- tipi_main_network
|
||||
|
||||
tipi-db:
|
||||
container_name: tipi-db
|
||||
image: postgres:latest
|
||||
|
@ -53,6 +67,12 @@ services:
|
|||
APPS_REPO_URL: ${APPS_REPO_URL}
|
||||
networks:
|
||||
- tipi_main_network
|
||||
# labels:
|
||||
# traefik.enable: true
|
||||
# traefik.http.routers.api.rule: PathPrefix("/api") # Host(`tipi.local`) &&
|
||||
# traefik.http.routers.api.entrypoints: webinsecure
|
||||
# traefik.http.routers.api.service: api
|
||||
# traefik.http.services.api.loadbalancer.server.port: 3001
|
||||
|
||||
dashboard:
|
||||
build:
|
||||
|
@ -73,7 +93,7 @@ services:
|
|||
labels:
|
||||
traefik.enable: true
|
||||
traefik.http.routers.dashboard.rule: PathPrefix("/") # Host(`tipi.local`) &&
|
||||
traefik.http.routers.dashboard.entrypoints: webinsecure
|
||||
traefik.http.routers.dashboard.entrypoints: web
|
||||
traefik.http.routers.dashboard.service: dashboard
|
||||
traefik.http.services.dashboard.loadbalancer.server.port: 3000
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@ version: "3.7"
|
|||
services:
|
||||
reverse-proxy:
|
||||
container_name: reverse-proxy
|
||||
image: traefik:v2.6
|
||||
image: traefik:v2.8
|
||||
restart: always
|
||||
ports:
|
||||
- ${NGINX_PORT-80}:80
|
||||
|
|
|
@ -3,7 +3,7 @@ version: "3.9"
|
|||
services:
|
||||
reverse-proxy:
|
||||
container_name: reverse-proxy
|
||||
image: traefik:v2.6
|
||||
image: traefik:v2.8
|
||||
restart: always
|
||||
ports:
|
||||
- ${NGINX_PORT-80}:80
|
||||
|
|
|
@ -1,14 +1,16 @@
|
|||
http:
|
||||
routers:
|
||||
traefik:
|
||||
rule: "Host(`proxy.tipi.local`)"
|
||||
service: "api@internal"
|
||||
tls:
|
||||
domains:
|
||||
- main: "tipi.local"
|
||||
sans:
|
||||
- "*.tipi.local"
|
||||
tls:
|
||||
certificates:
|
||||
- certFile: "/root/.config/ssl/local-cert.pem"
|
||||
keyFile: "/root/.config/ssl/local-key.pem"
|
||||
dashboard:
|
||||
rule: PathPrefix(`/`)
|
||||
service: dashboard
|
||||
|
||||
services:
|
||||
dashboard:
|
||||
loadBalancer:
|
||||
servers:
|
||||
- port: 3000
|
||||
|
||||
# tls:
|
||||
# certificates:
|
||||
# - certFile: "/root/.config/ssl/local-cert.pem"
|
||||
# keyFile: "/root/.config/ssl/local-key.pem"
|
|
@ -1,6 +1,6 @@
|
|||
api:
|
||||
dashboard: true
|
||||
insecure: true
|
||||
# api:
|
||||
# dashboard: true
|
||||
# insecure: true
|
||||
|
||||
providers:
|
||||
docker:
|
||||
|
@ -14,7 +14,7 @@ providers:
|
|||
# watch: true
|
||||
|
||||
entryPoints:
|
||||
webinsecure:
|
||||
web:
|
||||
address: ":80"
|
||||
# TODO: Redirect when TLS is working
|
||||
# http:
|
||||
|
@ -22,8 +22,8 @@ entryPoints:
|
|||
# entryPoint:
|
||||
# to: websecure
|
||||
# scheme: https
|
||||
# websecure:
|
||||
# address: ":443"
|
||||
websecure:
|
||||
address: ":443"
|
||||
|
||||
log:
|
||||
level: DEBUG
|
||||
|
|
Loading…
Add table
Reference in a new issue