From 3cf87f7527f6d4aa302be0ea8fbe1ab83bc43fc5 Mon Sep 17 00:00:00 2001 From: Habib Fatkhul Rohman Date: Tue, 21 Oct 2025 15:05:49 +0700 Subject: [PATCH] Update Dockerfile to run migrations and seed data; add Nginx route for log retrieval --- docker/Dockerfile | 2 +- docker/nginx/default.conf | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/docker/Dockerfile b/docker/Dockerfile index c4f3470..96860c9 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -8,4 +8,4 @@ COPY . . RUN go mod tidy -CMD ["air"] \ No newline at end of file +CMD go run cmd/main.go --migrate --seed && air \ No newline at end of file diff --git a/docker/nginx/default.conf b/docker/nginx/default.conf index 330dc5c..e7de0eb 100644 --- a/docker/nginx/default.conf +++ b/docker/nginx/default.conf @@ -11,6 +11,16 @@ server { proxy_cache_bypass $http_upgrade; } + # Tambahkan route khusus untuk /logs + location /logs { + proxy_pass http://app:8888; + proxy_http_version 1.1; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection keep-alive; + proxy_set_header Host $host; + proxy_cache_bypass $http_upgrade; + } + error_page 404 /404.html; location = /404.html { root /usr/share/nginx/html;