From: Giorgio Ravera Date: Mon, 13 Jan 2020 19:57:29 +0000 (+0100) Subject: Many fixes X-Git-Url: http://git.giorgioravera.it/?a=commitdiff_plain;h=2861b36e9e67cb5fe60e4996a49a01e1264cce3e;p=docker.git Many fixes --- diff --git a/homeassistant/docker-compose.yaml b/homeassistant/docker-compose.yaml deleted file mode 100644 index baa9ca4..0000000 --- a/homeassistant/docker-compose.yaml +++ /dev/null @@ -1,34 +0,0 @@ -version: '3' - -services: - homeassistant: - container_name: homeassistant - image: homeassistant/home-assistant:stable - #command: --log-file /config/log/home-assistant.log - restart: always - #ports: - # - 8123:8123 - environment: - - TZ=${DOCKER_TZ} - privileged: true - volumes: - - ${DOCKER_CFG_DIR}/homeassistant:/config - networks: - - proxy - labels: - - "traefik.enable=true" - - "traefik.http.routers.homeassistant.entrypoints=http" - - "traefik.http.routers.homeassistant.rule=Host(`home.giorgioravera.it`)" - #- "traefik.http.middlewares.homeassistant-https-redirect.redirectscheme.scheme=https" - #- "traefik.http.routers.homeassistant.middlewares=homeassistant-https-redirect" - - "traefik.http.routers.homeassistant-secure.entrypoints=https" - - "traefik.http.routers.homeassistant-secure.rule=Host(`home.giorgioravera.it`)" - - "traefik.http.routers.homeassistant-secure.tls=true" - #- "traefik.http.routers.homeassistant-secure.tls.certresolver=http" - - "traefik.http.routers.homeassistant-secure.service=homeassistant" - - "traefik.http.services.homeassistant.loadbalancer.server.port=8123" - - "traefik.docker.network=proxy" - -networks: - proxy: - external: true diff --git a/homeassistant/docker-compose.yaml b/homeassistant/docker-compose.yaml new file mode 120000 index 0000000..128fd45 --- /dev/null +++ b/homeassistant/docker-compose.yaml @@ -0,0 +1 @@ +docker-compose.yaml.net \ No newline at end of file diff --git a/homeassistant/docker-compose.yaml.host b/homeassistant/docker-compose.yaml.host new file mode 100644 index 0000000..46c8b7e --- /dev/null +++ b/homeassistant/docker-compose.yaml.host @@ -0,0 +1,33 @@ +version: '3' + +services: + homeassistant: + container_name: homeassistant + image: homeassistant/home-assistant:stable + #command: --log-file /config/log/home-assistant.log + restart: always + #ports: + # - 8123:8123 + depends_on: + - mosquitto + - zigbee2mqtt + environment: + - TZ=${DOCKER_TZ} + privileged: true + #user: "1001:1000" + volumes: + - ${DOCKER_CFG_DIR}/homeassistant:/config + network_mode: host + labels: + - "traefik.enable=true" + - "traefik.http.routers.homeassistant.entrypoints=http" + - "traefik.http.routers.homeassistant.rule=Host(`home.giorgioravera.it`)" + #- "traefik.http.middlewares.homeassistant-https-redirect.redirectscheme.scheme=https" + #- "traefik.http.routers.homeassistant.middlewares=homeassistant-https-redirect" + - "traefik.http.routers.homeassistant-secure.entrypoints=https" + - "traefik.http.routers.homeassistant-secure.rule=Host(`home.giorgioravera.it`)" + - "traefik.http.routers.homeassistant-secure.tls=true" + #- "traefik.http.routers.homeassistant-secure.tls.certresolver=http" + - "traefik.http.routers.homeassistant-secure.service=homeassistant" + - "traefik.http.services.homeassistant.loadbalancer.server.port=8123" + #- "traefik.docker.network=host" diff --git a/homeassistant/docker-compose.yaml.net b/homeassistant/docker-compose.yaml.net new file mode 100644 index 0000000..06d1e5f --- /dev/null +++ b/homeassistant/docker-compose.yaml.net @@ -0,0 +1,35 @@ +version: '3' + +services: + homeassistant: + container_name: homeassistant + image: homeassistant/home-assistant:stable + #command: --log-file /config/log/home-assistant.log + restart: always + #ports: + # - 8123:8123 + environment: + - TZ=${DOCKER_TZ} + privileged: true + #user: "1001:1000" + volumes: + - ${DOCKER_CFG_DIR}/homeassistant:/config + networks: + - proxy + labels: + - "traefik.enable=true" + - "traefik.http.routers.homeassistant.entrypoints=http" + - "traefik.http.routers.homeassistant.rule=Host(`home.giorgioravera.it`)" + #- "traefik.http.middlewares.homeassistant-https-redirect.redirectscheme.scheme=https" + #- "traefik.http.routers.homeassistant.middlewares=homeassistant-https-redirect" + - "traefik.http.routers.homeassistant-secure.entrypoints=https" + - "traefik.http.routers.homeassistant-secure.rule=Host(`home.giorgioravera.it`)" + - "traefik.http.routers.homeassistant-secure.tls=true" + #- "traefik.http.routers.homeassistant-secure.tls.certresolver=http" + - "traefik.http.routers.homeassistant-secure.service=homeassistant" + - "traefik.http.services.homeassistant.loadbalancer.server.port=8123" + - "traefik.docker.network=proxy" + +networks: + proxy: + external: true diff --git a/traefik/docker-compose.yaml b/traefik/docker-compose.yaml deleted file mode 100644 index 0e080ee..0000000 --- a/traefik/docker-compose.yaml +++ /dev/null @@ -1,50 +0,0 @@ -version: '3' - -services: - traefik: - container_name: traefik - image: traefik:v2.0 -# command: -# - --api -# - --api.dashboard -# - --entrypoints.http.address=:80 -# - --entrypoints.https.address=:443 -# - --providers.docker=true -# - --providers.file.watch=true -# - --log.level=DEBUG - #restart: unless-stopped - restart: always - ports: - - 80:80 - - 443:443 - environment: - - TZ=${DOCKER_TZ} - volumes: - - ${DOCKER_CFG_DIR}/traefik/traefik.yml:/traefik.yml:ro - - ${DOCKER_CFG_DIR}/traefik/passwd:/passwd - - ${DOCKER_CFG_DIR}/traefik/acme.json:/acme.json - - ${DOCKER_CFG_DIR}/traefik/config:/config - - /etc/letsencrypt/live/server.giorgioravera.it/fullchain.pem:/certs/fullchain.pem - - /etc/letsencrypt/live/server.giorgioravera.it/privkey.pem:/certs/privkey.pem - - /var/run/docker.sock:/var/run/docker.sock - networks: - - proxy - labels: - - "traefik.enable=true" - - "traefik.http.routers.traefik.entrypoints=http" - - "traefik.http.routers.traefik.rule=Host(`traefik.giorgioravera.it`)" - - "traefik.http.routers.traefik.service=api@internal" - - "traefik.http.routers.traefik.middlewares=traefik-auth" - #- "traefik.http.routers.traefik.middlewares=traefik-https-redirect" - #- "traefik.http.middlewares.traefik-https-redirect.redirectscheme.scheme=https" - - "traefik.http.routers.traefik-secure.entrypoints=https" - - "traefik.http.routers.traefik-secure.rule=Host(`traefik.giorgioravera.it`)" - - "traefik.http.routers.traefik-secure.middlewares=traefik-auth" - - "traefik.http.routers.traefik-secure.tls=true" - #- "traefik.http.routers.traefik-secure.tls.certresolver=http" - - "traefik.http.routers.traefik-secure.service=api@internal" - - "traefik.http.middlewares.traefik-auth.basicauth.usersfile=/passwd" - -networks: - proxy: - external: true diff --git a/traefik/docker-compose.yaml b/traefik/docker-compose.yaml new file mode 120000 index 0000000..128fd45 --- /dev/null +++ b/traefik/docker-compose.yaml @@ -0,0 +1 @@ +docker-compose.yaml.net \ No newline at end of file diff --git a/traefik/docker-compose.yaml.host b/traefik/docker-compose.yaml.host new file mode 100644 index 0000000..15d7834 --- /dev/null +++ b/traefik/docker-compose.yaml.host @@ -0,0 +1,46 @@ +version: '3' + +services: + traefik: + container_name: traefik + image: traefik:v2.0 +# command: +# - --api +# - --api.dashboard +# - --entrypoints.http.address=:80 +# - --entrypoints.https.address=:443 +# - --providers.docker=true +# - --providers.file.watch=true +# - --log.level=DEBUG + #restart: unless-stopped + restart: always + #ports: + # - 80:80 + # - 443:443 + environment: + - TZ=${DOCKER_TZ} + volumes: + - ${DOCKER_CFG_DIR}/traefik/traefik.yml:/traefik.yml:ro + - ${DOCKER_CFG_DIR}/traefik/passwd:/passwd + - ${DOCKER_CFG_DIR}/traefik/acme.json:/acme.json + - ${DOCKER_CFG_DIR}/traefik/config:/config + - /etc/letsencrypt/live/server.giorgioravera.it/fullchain.pem:/certs/fullchain.pem + - /etc/letsencrypt/live/server.giorgioravera.it/privkey.pem:/certs/privkey.pem + - /var/run/docker.sock:/var/run/docker.sock + network_mode: host + labels: + - "traefik.enable=true" + - "traefik.http.routers.traefik.entrypoints=http" + - "traefik.http.routers.traefik.rule=Host(`traefik.giorgioravera.it`)" + - "traefik.http.routers.traefik.service=api@internal" + - "traefik.http.routers.traefik.middlewares=traefik-auth" + #- "traefik.http.routers.traefik.middlewares=traefik-https-redirect" + #- "traefik.http.middlewares.traefik-https-redirect.redirectscheme.scheme=https" + - "traefik.http.routers.traefik-secure.entrypoints=https" + - "traefik.http.routers.traefik-secure.rule=Host(`traefik.giorgioravera.it`)" + - "traefik.http.routers.traefik-secure.middlewares=traefik-auth" + - "traefik.http.routers.traefik-secure.tls=true" + #- "traefik.http.routers.traefik-secure.tls.certresolver=http" + - "traefik.http.routers.traefik-secure.service=api@internal" + - "traefik.http.middlewares.traefik-auth.basicauth.usersfile=/passwd" + - "traefik.http.services.workaround.loadbalancer.server.port=9999" diff --git a/traefik/docker-compose.yaml.net b/traefik/docker-compose.yaml.net new file mode 100644 index 0000000..0e080ee --- /dev/null +++ b/traefik/docker-compose.yaml.net @@ -0,0 +1,50 @@ +version: '3' + +services: + traefik: + container_name: traefik + image: traefik:v2.0 +# command: +# - --api +# - --api.dashboard +# - --entrypoints.http.address=:80 +# - --entrypoints.https.address=:443 +# - --providers.docker=true +# - --providers.file.watch=true +# - --log.level=DEBUG + #restart: unless-stopped + restart: always + ports: + - 80:80 + - 443:443 + environment: + - TZ=${DOCKER_TZ} + volumes: + - ${DOCKER_CFG_DIR}/traefik/traefik.yml:/traefik.yml:ro + - ${DOCKER_CFG_DIR}/traefik/passwd:/passwd + - ${DOCKER_CFG_DIR}/traefik/acme.json:/acme.json + - ${DOCKER_CFG_DIR}/traefik/config:/config + - /etc/letsencrypt/live/server.giorgioravera.it/fullchain.pem:/certs/fullchain.pem + - /etc/letsencrypt/live/server.giorgioravera.it/privkey.pem:/certs/privkey.pem + - /var/run/docker.sock:/var/run/docker.sock + networks: + - proxy + labels: + - "traefik.enable=true" + - "traefik.http.routers.traefik.entrypoints=http" + - "traefik.http.routers.traefik.rule=Host(`traefik.giorgioravera.it`)" + - "traefik.http.routers.traefik.service=api@internal" + - "traefik.http.routers.traefik.middlewares=traefik-auth" + #- "traefik.http.routers.traefik.middlewares=traefik-https-redirect" + #- "traefik.http.middlewares.traefik-https-redirect.redirectscheme.scheme=https" + - "traefik.http.routers.traefik-secure.entrypoints=https" + - "traefik.http.routers.traefik-secure.rule=Host(`traefik.giorgioravera.it`)" + - "traefik.http.routers.traefik-secure.middlewares=traefik-auth" + - "traefik.http.routers.traefik-secure.tls=true" + #- "traefik.http.routers.traefik-secure.tls.certresolver=http" + - "traefik.http.routers.traefik-secure.service=api@internal" + - "traefik.http.middlewares.traefik-auth.basicauth.usersfile=/passwd" + +networks: + proxy: + external: true