From cdeef879d02a3ce4ec302c9b8125eb8d45c8bcb7 Mon Sep 17 00:00:00 2001 From: Klagarge Date: Tue, 13 May 2025 22:16:00 +0200 Subject: [PATCH 1/2] feat(gateway): added watchtower service for automatic container updates Signed-off-by: Klagarge --- .gitignore | 2 ++ docker-compose.yml | 16 ++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/.gitignore b/.gitignore index 91adc1b..3fb8e93 100644 --- a/.gitignore +++ b/.gitignore @@ -90,3 +90,5 @@ fabric.properties # Android studio 3.1+ serialized cache file .idea/caches/build_file_checksums.ser + +config.json \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 98cc010..c686519 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -6,6 +6,18 @@ volumes: rabbitmq_data: services: + watchtower: + image: containrrr/watchtower + container_name: watchtower + restart: unless-stopped + volumes: + - /var/run/docker.sock:/var/run/docker.sock + - ./config.json:/config.json + environment: + - DOCKER_CONFIG=/ + - WATCHTOWER_POLL_INTERVAL=60 + - WATCHTOWER_LABEL_ENABLE=true + gateway: image: registry.forge.hefr.ch/team-raclette/project-softweng/gateway:latest container_name: gateway @@ -36,6 +48,9 @@ services: - "traefik.http.routers.Gateway-https.rule=Host(`rest.mse.kb28.ch`)" - "traefik.http.routers.Gateway-https.tls.certResolver=letsencrypt" - "traefik.http.services.Gateway-https.loadbalancer.server.port=8080" + + - "com.centurylinklabs.watchtower.enable=true" + influxdb: image: influxdb:2 container_name: influxdb @@ -62,6 +77,7 @@ services: - "traefik.http.routers.influx-https.rule=Host(`influx.mse.kb28.ch`)" - "traefik.http.routers.influx-https.tls.certResolver=letsencrypt" - "traefik.http.services.influx-https.loadbalancer.server.port=8086" + rabbitmq: image: rabbitmq:3-management-alpine container_name: rabbitmq From 82f44bbd12d541604da4e7bcfcc7bece72b44ad3 Mon Sep 17 00:00:00 2001 From: Klagarge Date: Wed, 14 May 2025 17:40:18 +0200 Subject: [PATCH 2/2] fix(gateway): remove network configuration Network should not be config, it's only a necessary part for the actual server deployment Signed-off-by: Klagarge --- docker-compose.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index c686519..dea4946 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -24,8 +24,6 @@ services: restart: unless-stopped ports: - "8080:8080" - networks: - - kb28_default environment: - INFLUXDB_TOKEN=$INFLUXDB_TOKEN - INFLUXDB_ORG=$INFLUXDB_ORG