From ff732aec4bd5e857e2df73f01e36a537c53bd0fb Mon Sep 17 00:00:00 2001 From: christoph Date: Sat, 18 Feb 2023 19:33:27 +0100 Subject: [PATCH] Reviewed --- docker-compose.yml | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 0d15e05..b7dc506 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,8 +6,11 @@ services: build: dockerfile: Dockerfile context: ./php81-apache - image: americus259/docker-php:8.1-apache -# container_name: myname +# If not named with "image" the build gets name of the service definition + image: americus259/php:8.1-apache +# pull_policy: < always | never | missing | build > +# build: always build / rebuild the image. you can also run seperatly "docker compose build --pull" before "docker compose up -d" + pull_policy: build restart: always networks: - proxy @@ -20,10 +23,10 @@ services: labels: - traefik.enable=true - - traefik.http.routers.apache-php.rule=Host(`www.example.com`) - - traefik.http.routers.apache-php.tls.certResolver=le - - traefik.http.routers.apache-php.service=apache-php - - traefik.http.services.apache-php.loadbalancer.server.port=80 + - traefik.http.routers.my-routername.rule=Host(`www.example.com`) + - traefik.http.routers.my-routername.tls.certResolver=le + - traefik.http.routers.my-routername.service=my-servicename + - traefik.http.services.my-servicename.loadbalancer.server.port=80 - traefik.docker.network=proxy networks: