move webserver files to ./web/

This commit is contained in:
2025-03-26 16:32:57 +01:00
parent f312489aa6
commit 0357c4f4b2
30 changed files with 10 additions and 10 deletions

View File

@@ -21,8 +21,8 @@ RUN go mod download
# Copy the source code
COPY ./src/cmd ./cmd
COPY ./src/assets ./assets
COPY ./src/internal ./internal
COPY ./src/web ./web
# Build the application
RUN go build -o main cmd/frontend/*
@@ -36,9 +36,9 @@ WORKDIR /app
# Copy the built binary from the builder stage
COPY --from=builder /app/main .
COPY --from=builder /goose.git/goose .
COPY ./src/assets ./assets
COPY ./src/migrations ./migrations
EXPOSE 8080
# Command to run the application
CMD ["sh", "-c", "/app/goose -dir=/app/assets/migrations/ postgres postgresql://$DB_USER:$DB_PASS@$DB_HOST:$DB_PORT/$DB_NAME up && /app/main"]
CMD ["sh", "-c", "/app/goose -dir=/app/migrations/ postgres postgresql://$DB_USER:$DB_PASS@$DB_HOST:$DB_PORT/$DB_NAME up && /app/main"]

View File

@@ -1,12 +1,12 @@
package main
import (
"crowsnest/internal/app"
"crowsnest/internal/crawler"
"crowsnest/internal/middleware"
"crowsnest/internal/model"
"crowsnest/internal/model/database"
"crowsnest/internal/util"
"crowsnest/web/app"
"crowsnest/web/middleware"
"log"
"net/http"
"os"

View File

@@ -1,7 +1,7 @@
package app
import (
"crowsnest/internal/html"
"crowsnest/web/html"
"net/http"
"strconv"
)

View File

@@ -1,7 +1,7 @@
package app
import (
"crowsnest/internal/html"
"crowsnest/web/html"
"net/http"
"strconv"
)

View File

@@ -1,7 +1,7 @@
package app
import (
"crowsnest/internal/html"
"crowsnest/web/html"
"net/http"
)