mirror of
https://github.com/Haxxnet/Compose-Examples
synced 2025-02-22 00:02:10 +00:00
Update docker-compose.yml
add optional traefik
This commit is contained in:
parent
a740bf5899
commit
97dad9d6bb
|
@ -31,9 +31,9 @@ services:
|
||||||
depends_on:
|
depends_on:
|
||||||
- postgres
|
- postgres
|
||||||
environment:
|
environment:
|
||||||
- PUBLIC_URL=https://resume.example.com
|
- PUBLIC_URL=http://resume.example.com
|
||||||
- PUBLIC_SERVER_URL=https://resume.example.com/api # only change the subdomain, leave /api as is
|
- PUBLIC_SERVER_URL=http://resume.example.com/api # only change the subdomain, leave /api as is
|
||||||
- SERVER_URL=https://resume.example.com/api # only change the subdomain, leave /api as is
|
- SERVER_URL=http://resume.example.com/api # only change the subdomain, leave /api as is
|
||||||
- PUBLIC_GOOGLE_CLIENT_ID=
|
- PUBLIC_GOOGLE_CLIENT_ID=
|
||||||
- POSTGRES_DB=postgres
|
- POSTGRES_DB=postgres
|
||||||
- POSTGRES_USER=postgres
|
- POSTGRES_USER=postgres
|
||||||
|
@ -82,9 +82,9 @@ services:
|
||||||
depends_on:
|
depends_on:
|
||||||
- server
|
- server
|
||||||
environment:
|
environment:
|
||||||
- PUBLIC_URL=https://resume.example.com
|
- PUBLIC_URL=http://resume.example.com
|
||||||
- PUBLIC_SERVER_URL=https://resume.example.com/api # only change the subdomain, leave /api as is
|
- PUBLIC_SERVER_URL=http://resume.example.com/api # only change the subdomain, leave /api as is
|
||||||
- SERVER_URL=https://resume.example.com/api # only change the subdomain, leave /api as is
|
- SERVER_URL=http://resume.example.com/api # only change the subdomain, leave /api as is
|
||||||
- PUBLIC_GOOGLE_CLIENT_ID=
|
- PUBLIC_GOOGLE_CLIENT_ID=
|
||||||
networks:
|
networks:
|
||||||
- proxy
|
- proxy
|
||||||
|
@ -96,6 +96,27 @@ services:
|
||||||
# Part for optional traefik middlewares
|
# Part for optional traefik middlewares
|
||||||
#- traefik.http.routers.rxresume-client.middlewares=local-ipwhitelist@file # may enable this middleware for access control
|
#- traefik.http.routers.rxresume-client.middlewares=local-ipwhitelist@file # may enable this middleware for access control
|
||||||
|
|
||||||
|
traefik:
|
||||||
|
image: traefik:v2.10.1
|
||||||
|
container_name: rxresume-traefik
|
||||||
|
restart: unless-stopped
|
||||||
|
command:
|
||||||
|
- "--log.level=INFO"
|
||||||
|
- "--api.insecure=true"
|
||||||
|
- "--providers.docker=true"
|
||||||
|
- "--providers.docker.exposedbydefault=false"
|
||||||
|
- "--entrypoints.web.address=:80"
|
||||||
|
ports:
|
||||||
|
- 80:80
|
||||||
|
- 8080:8080
|
||||||
|
environment:
|
||||||
|
- VIRTUAL_HOST=resume.example.com
|
||||||
|
- VIRTUAL_PORT=80
|
||||||
|
networks:
|
||||||
|
- proxy
|
||||||
|
volumes:
|
||||||
|
- /var/run/docker.sock:/var/run/docker.sock:ro
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
proxy:
|
proxy:
|
||||||
external: true
|
external: true
|
||||||
|
|
Loading…
Reference in New Issue
Block a user