diff --git a/.vscode/launch.json b/.vscode/launch.json index 33aa3ec..6541703 100644 --- a/.vscode/launch.json +++ b/.vscode/launch.json @@ -6,7 +6,8 @@ "type": "go", "request": "launch", "mode": "debug", - "program": "main.go" + "program": "cmd/main.go", + "cwd": "${workspaceFolder}" } ] } \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index e8bd9e1..e1209c6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -16,9 +16,8 @@ RUN apk --no-cache add ca-certificates tzdata WORKDIR /app -COPY --from=builder /go/bin/main /app/main -COPY --from=builder /go/src/app/web/templates /app/web/templates -COPY --from=builder /go/src/app/web/public /app/web/public +COPY --from=builder /go/bin/main /app/cmd/main +COPY --from=builder /go/src/app/web /app/web -ENTRYPOINT /app/main +ENTRYPOINT /app/cmd/main EXPOSE 3000 diff --git a/internal/app/http.go b/internal/app/http.go index e3f501f..df1ed6d 100644 --- a/internal/app/http.go +++ b/internal/app/http.go @@ -79,7 +79,7 @@ func WebStart(port string, car Car) { router := mux.NewRouter() - fs := http.FileServer(http.Dir("public")) + fs := http.FileServer(http.Dir("web/public")) publicHandler := http.StripPrefix("/public/", fs) pathPrefix := os.Getenv("PATH_PREFIX")