Skip to content

Commit

Permalink
Add traefik service
Browse files Browse the repository at this point in the history
  • Loading branch information
a-h-abid committed Oct 7, 2024
1 parent cdca5f0 commit 85d267f
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ REDIS_IMAGE_TAG=7.4.1
REDISEARCH_IMAGE_TAG=2.0.6
REDIS_STACK_IMAGE_TAG=7.2.0-v10
REDIS_INSIGHT_IMAGE_TAG=2.58.0
TRAEFIK_IMAGE_TAG=2.9.6
TRAEFIK_IMAGE_TAG=3.1.5
POSTGRES_IMAGE_TAG=15.2
ZOOKEEPER_IMAGE_TAG=3.8.1
APACHE_DRUID_IMAGE_TAG=24.0.2-rc1
Expand Down
17 changes: 17 additions & 0 deletions traefik/.example.env
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# https://doc.traefik.io/traefik/reference/static-configuration/env/

TRAEFIK_ACCESSLOG=true
TRAEFIK_API=true
TRAEFIK_API_DEBUG=false
TRAEFIK_API_INSECURE=true
TRAEFIK_PROVIDERS_DOCKER=true
TRAEFIK_PROVIDERS_DOCKER_NETWORK=common-traefik-net
TRAEFIK_PROVIDERS_FILE_DIRECTORY=/configuration/
TRAEFIK_PROVIDERS_FILE_WATCH=true

TRAEFIK_ENTRYPOINTS_WEB=true
TRAEFIK_ENTRYPOINTS_WEB_ADDRESS=":80"
TRAEFIK_ENTRYPOINTS_WEBSECURE=true
TRAEFIK_ENTRYPOINTS_WEBSECURE_ADDRESS=":443"

TRAEFIK_SERVERSTRANSPORT_INSECURESKIPVERIFY=true
22 changes: 22 additions & 0 deletions traefik/compose.traefik.example.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
networks:
common-traefik-net:
external: true

services:
traefik:
image: traefik:${TRAEFIK_IMAGE_TAG:-3.1.5}
env_file:
- .env
labels:
- "traefik.enable=true"
- "traefik.http.routers.traefik=true"
networks:
- common-traefik-net
ports:
- 127.0.0.1:80:80
- 127.0.0.1:443:443
- 127.0.0.1:${TRAEFIK_DASHBOARD_PUBLISH_PORT:-8080}:8080
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./traefik/configuration:/configuration
- ./.commons/certs:/certs

0 comments on commit 85d267f

Please sign in to comment.