From 761f948a62421adcc6103742de85c6cc7a0cb48d Mon Sep 17 00:00:00 2001 From: Lectom C Han Date: Wed, 10 Dec 2025 11:13:22 +0900 Subject: [PATCH] =?UTF-8?q?request=20header=20=EB=8D=94=20=ED=81=B0=20?= =?UTF-8?q?=EA=B0=92=20=ED=97=88=EC=9A=A9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Dockerfile | 4 ++++ cmd/server/main.go | 7 ++++--- docker-compose.yml | 4 ++++ log/user_program_import_20251209_184758.log | 7 ------- log/user_program_import_20251210_102751.log | 7 ------- 5 files changed, 12 insertions(+), 17 deletions(-) delete mode 100644 log/user_program_import_20251209_184758.log delete mode 100644 log/user_program_import_20251210_102751.log diff --git a/Dockerfile b/Dockerfile index 47dbfb9..35e16d8 100644 --- a/Dockerfile +++ b/Dockerfile @@ -19,9 +19,13 @@ FROM debian:trixie-slim ARG APP_UID=1000 ARG APP_GID=1000 +ENV TZ=Asia/Seoul + RUN groupadd -g ${APP_GID} appuser && \ useradd --create-home --shell /usr/sbin/nologin --uid ${APP_UID} --gid ${APP_GID} appuser +RUN ln -snf /usr/share/zoneinfo/${TZ} /etc/localtime && echo ${TZ} > /etc/timezone + WORKDIR / COPY --from=builder /bin/geoip /usr/local/bin/geoip diff --git a/cmd/server/main.go b/cmd/server/main.go index f9581bd..173096a 100644 --- a/cmd/server/main.go +++ b/cmd/server/main.go @@ -42,6 +42,7 @@ func main() { app := fiber.New(fiber.Config{ DisableStartupMessage: true, + ReadBufferSize: 16 * 1024, // allow larger request headers (e.g., proxy cookies) }) app.Get("/", func(c *fiber.Ctx) error { @@ -145,9 +146,9 @@ func maybeStartScheduler() func() context.Context { command := defaultJob sched, err := schedule.Start(schedule.Config{ - CronExpr: cronExpr, - Command: command, - Logger: log.Default(), + CronExpr: cronExpr, + Command: command, + Logger: log.Default(), }) if err != nil { log.Printf("scheduler not started (error=%v)", err) diff --git a/docker-compose.yml b/docker-compose.yml index 169f7cf..e20f942 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -5,6 +5,8 @@ services: args: - APP_UID=${APP_UID:-1000} - APP_GID=${APP_GID:-1000} + environment: + - TZ=Asia/Seoul env_file: - .env depends_on: @@ -38,6 +40,8 @@ services: db: image: postgres:17.7-trixie + environment: + - TZ=Asia/Seoul env_file: - .env environment: diff --git a/log/user_program_import_20251209_184758.log b/log/user_program_import_20251209_184758.log deleted file mode 100644 index 6768f51..0000000 --- a/log/user_program_import_20251209_184758.log +++ /dev/null @@ -1,7 +0,0 @@ -status=failed -csv_path=import/user_program_info_20251208.csv -started_at=2025-12-09T18:47:58+09:00 -finished_at= -rows_copied=0 -rows_upserted=0 -error=open import/user_program_info_20251208.csv: no such file or directory diff --git a/log/user_program_import_20251210_102751.log b/log/user_program_import_20251210_102751.log deleted file mode 100644 index 4829ebf..0000000 --- a/log/user_program_import_20251210_102751.log +++ /dev/null @@ -1,7 +0,0 @@ -status=failed -csv_path=/update_data/user_program_info_20251209.csv -started_at=2025-12-10T10:27:51+09:00 -finished_at= -rows_copied=0 -rows_upserted=0 -error=ERROR: relation "user_program_info_replica_import_tmp" already exists (SQLSTATE 42P07)