Update Dockerfile to run migrations and seed data; add Nginx route for log retrieval

This commit is contained in:
Habib Fatkhul Rohman 2025-10-21 15:05:49 +07:00
parent 3ea963bd9e
commit 3cf87f7527
2 changed files with 11 additions and 1 deletions

View File

@ -8,4 +8,4 @@ COPY . .
RUN go mod tidy
CMD ["air"]
CMD go run cmd/main.go --migrate --seed && air

View File

@ -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;