From c1e931ee8f32d8dc96e990ae5df091fa8d96be2a Mon Sep 17 00:00:00 2001 From: Markus Opolka Date: Thu, 16 Mar 2023 16:23:31 +0100 Subject: [PATCH] Update Traefik Examples Acked-by: Markus Opolka --- docker-compose.traefik.domain.yml | 42 +++++++++++++++++++++++++++++++ docker-compose.traefik.yml | 2 +- 2 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 docker-compose.traefik.domain.yml diff --git a/docker-compose.traefik.domain.yml b/docker-compose.traefik.domain.yml new file mode 100644 index 0000000..f86e1cc --- /dev/null +++ b/docker-compose.traefik.domain.yml @@ -0,0 +1,42 @@ +version: "3.0" +services: + limesurvey: + build: + context: 5.0/apache/ + dockerfile: Dockerfile + labels: + traefik.enable: 'true' + traefik.http.routers.limesurvey-http-router.entrypoints: "http" + traefik.http.routers.limesurvey-http-router.rule: "Host(`my.survey.localhost`)" + traefik.http.services.limesurvey-service.loadbalancer.server.port: "8080" + links: + - lime-db + depends_on: + - lime-db + environment: + - "DB_HOST=lime-db" + - "DB_PASSWORD=secret" + - "ADMIN_PASSWORD=foobar" + - "PUBLIC_URL=http://my.survey.localhost:8888" + - "BASE_URL=http://my.survey.localhost:8888" + traefik: + image: docker.io/traefik:v2.9 + container_name: "traefik" + command: + - "--api.insecure=true" + - "--providers.docker=true" + - "--providers.docker.exposedbydefault=false" + - "--entrypoints.http.address=:8888" + ports: + - "8888:8888" + - "8080:8080" + volumes: + - "/var/run/docker.sock:/var/run/docker.sock:ro" + lime-db: + image: docker.io/mysql:5.7 + environment: + - "MYSQL_USER=limesurvey" + - "MYSQL_DATABASE=limesurvey" + - "MYSQL_PASSWORD=secret" + - "MYSQL_ROOT_PASSWORD=secret" + diff --git a/docker-compose.traefik.yml b/docker-compose.traefik.yml index 12f1594..7bc4293 100644 --- a/docker-compose.traefik.yml +++ b/docker-compose.traefik.yml @@ -24,7 +24,7 @@ services: - "PUBLIC_URL=http://localhost:8888/limesurvey" - "BASE_URL=http://localhost:8888/limesurvey" traefik: - image: docker.io/traefik:v2.5 + image: docker.io/traefik:v2.9 container_name: "traefik" command: - "--api.insecure=true"