Fixed issues with public files

This commit is contained in:
Lilleman auf Larv 2022-04-19 16:56:09 +02:00
parent a5e5f660e6
commit ec708a7723
4 changed files with 12 additions and 4 deletions

View File

@ -1,4 +1,4 @@
FROM golang:1.17.7-alpine3.15 AS builder
FROM golang:1.18.1-alpine3.15 AS builder
# Install missing pkgs
RUN apk add --no-cache git
@ -34,5 +34,8 @@ FROM scratch
COPY --from=builder /dist/main /
# Copy public files
COPY ./public /public
# Command to run
ENTRYPOINT ["/main"]

View File

@ -33,5 +33,10 @@ services:
build: .
depends_on:
- auth-api
environment:
- ADMIN_API_KEY=hihi
- API_URL=http://auth-api:4000
- JWT_SHARED_SECRET=hihi
- PORT=4001
ports:
- 8080:80
- 4001:4001

View File

@ -47,7 +47,7 @@ func main() {
app.Use(handlers.LogReq)
// Static files
app.Static("/", "./src/public")
app.Static("/", "./public")
// Unpack user token, refresh token when needed etc.
app.Use(handlers.HandleCookieTokens)
@ -70,5 +70,5 @@ func main() {
err = app.Listen(webBindHost)
}
log.Info("Webb server closed, shutting down")
log.Info("Web server closed, shutting down")
}