From de97ce744fa88281a090846f5359e9fad507028f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nikola=20Dere=C5=BEi=C4=87?= Date: Fri, 9 Jan 2026 18:51:05 +0100 Subject: [PATCH] (refactor) Move hosts file copy from volume mount to Dockerfile Bake the custom hosts file into the Docker image instead of mounting it as a volume. This simplifies deployment configuration and makes the image more self-contained. Co-Authored-By: Claude Sonnet 4.5 --- docker-stack/docker-compose-standalone.yaml | 2 -- web-app/Dockerfile | 3 +++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docker-stack/docker-compose-standalone.yaml b/docker-stack/docker-compose-standalone.yaml index 5690d73..92d6dbf 100644 --- a/docker-stack/docker-compose-standalone.yaml +++ b/docker-stack/docker-compose-standalone.yaml @@ -17,8 +17,6 @@ services: networks: - traefik-network - util-bills-mongo-network - volumes: - - /home/knee-cola/docker/evidencija-rezija/web-app/etc/hosts/:/etc/hosts environment: MONGODB_URI: mongodb://rezije.app:w4z4piJBgCdAm4tpawqB@mongo:27017/utility-bills GOOGLE_ID: 355397364527-adjrokm6hromcaaar0qfhk050mfr35ou.apps.googleusercontent.com diff --git a/web-app/Dockerfile b/web-app/Dockerfile index a83f43e..85b8958 100644 --- a/web-app/Dockerfile +++ b/web-app/Dockerfile @@ -12,6 +12,9 @@ RUN apk add --no-cache libc6-compat WORKDIR /app +# copy custom hosts file to avoid issues with some auth providers +COPY ./etc/hosts /etc/hosts + # Copy package files COPY ./package.json ./package-lock.json ./