From 4b8d776bd58196bb7ce703a0244d0cab450d47dc Mon Sep 17 00:00:00 2001 From: root Date: Sat, 21 Feb 2026 16:39:42 +0000 Subject: [PATCH] revert c0f3a807427ffb351962c09f27588352d93ef0be revert shortified link port fix --- docker-compose.yml | 7 ++++--- internal/handlers/links.go | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 5579c5e..ef27a61 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,6 +7,8 @@ services: depends_on: redis: condition: service_healthy + ports: + - "8080:8080" expose: - 8080 environment: @@ -17,12 +19,11 @@ services: - LETSENCRYPT_EMAIL=${LETSENCRYPT_EMAIL} - SERVER_PORT=${SERVER_PORT} - REDIS_URL=${REDIS_URL} - restart: unless-stopped healthcheck: - test: ["CMD", "wget", "-qO-", "http://localhost:8080/ping"] + test: ["CMD", "curl", "-fsS", "http://localhost:8080/ping"] interval: 5s timeout: 2s - retries: 10 + retries: 20 start_period: 10s redis: diff --git a/internal/handlers/links.go b/internal/handlers/links.go index 4e31f2e..d5f93ae 100644 --- a/internal/handlers/links.go +++ b/internal/handlers/links.go @@ -47,7 +47,7 @@ func (h *LinksHandler) CreateLink(c *gin.Context) { return } - address := fmt.Sprintf("http://%v/r/%v", h.host, id) + address := fmt.Sprintf("http://%v:%s/r/%v", h.host, h.port, id) response := CreateLinkResponse{ Status: "success",