diff --git a/docker-compose.yml b/docker-compose.yml index 0c174bd..294343d 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -8,8 +8,6 @@ services: depends_on: redis: condition: service_healthy - ports: - - "8080:8080" expose: - 8080 environment: @@ -20,11 +18,12 @@ services: - LETSENCRYPT_EMAIL=${LETSENCRYPT_EMAIL} - SERVER_PORT=${SERVER_PORT} - REDIS_URL=${REDIS_URL} + restart: unless-stopped healthcheck: - test: ["CMD", "curl", "-fsS", "http://localhost:8080/ping"] + test: ["CMD", "wget", "-qO-", "http://localhost:8080/ping"] interval: 5s timeout: 2s - retries: 20 + retries: 10 start_period: 10s redis: diff --git a/internal/handlers/links.go b/internal/handlers/links.go index d5f93ae..4e31f2e 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:%s/r/%v", h.host, h.port, id) + address := fmt.Sprintf("http://%v/r/%v", h.host, id) response := CreateLinkResponse{ Status: "success",