diff --git a/Dockerfile b/Dockerfile index 045473f..094f621 100644 --- a/Dockerfile +++ b/Dockerfile @@ -42,6 +42,5 @@ COPY --from=build /workspace/bin/web-app /usr/local/bin/web-app COPY --from=build /workspace/static ./static/ COPY --from=build /workspace/data ./data/ -ENV SERVER_PORT=80 EXPOSE 80 ENTRYPOINT ["/usr/local/bin/web-app", "--port 80"] diff --git a/go-app-compose.yaml b/go-app-compose.yaml index ec3fab5..8947752 100644 --- a/go-app-compose.yaml +++ b/go-app-compose.yaml @@ -8,6 +8,7 @@ services: environment: - VIRTUAL_HOST=yuanyuanzhou.nl - LETSENCRYPT_HOST=yuanyuanzhou.nl + - SERVER_PORT=:80 volumes: - db_data:/app/data ports: diff --git a/main.go b/main.go index d69d93c..7df3154 100644 --- a/main.go +++ b/main.go @@ -321,9 +321,9 @@ func splitPDFByPage(inputPath string, outputDir string) error { func determinePort() string { port, ok := os.LookupEnv("SERVER_PORT") if !ok { - port = ":8080" + port = "8080" } - return port + return ":" + port } func configDatabase() error {