move webserver files to ./web/
This commit is contained in:
@@ -21,8 +21,8 @@ RUN go mod download
|
|||||||
|
|
||||||
# Copy the source code
|
# Copy the source code
|
||||||
COPY ./src/cmd ./cmd
|
COPY ./src/cmd ./cmd
|
||||||
COPY ./src/assets ./assets
|
|
||||||
COPY ./src/internal ./internal
|
COPY ./src/internal ./internal
|
||||||
|
COPY ./src/web ./web
|
||||||
|
|
||||||
# Build the application
|
# Build the application
|
||||||
RUN go build -o main cmd/frontend/*
|
RUN go build -o main cmd/frontend/*
|
||||||
@@ -36,9 +36,9 @@ WORKDIR /app
|
|||||||
# Copy the built binary from the builder stage
|
# Copy the built binary from the builder stage
|
||||||
COPY --from=builder /app/main .
|
COPY --from=builder /app/main .
|
||||||
COPY --from=builder /goose.git/goose .
|
COPY --from=builder /goose.git/goose .
|
||||||
COPY ./src/assets ./assets
|
COPY ./src/migrations ./migrations
|
||||||
|
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
|
|
||||||
# Command to run the application
|
# 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"]
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"crowsnest/internal/app"
|
|
||||||
"crowsnest/internal/crawler"
|
"crowsnest/internal/crawler"
|
||||||
"crowsnest/internal/middleware"
|
|
||||||
"crowsnest/internal/model"
|
"crowsnest/internal/model"
|
||||||
"crowsnest/internal/model/database"
|
"crowsnest/internal/model/database"
|
||||||
"crowsnest/internal/util"
|
"crowsnest/internal/util"
|
||||||
|
"crowsnest/web/app"
|
||||||
|
"crowsnest/web/middleware"
|
||||||
"log"
|
"log"
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
package app
|
package app
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"crowsnest/internal/html"
|
"crowsnest/web/html"
|
||||||
"net/http"
|
"net/http"
|
||||||
"strconv"
|
"strconv"
|
||||||
)
|
)
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
package app
|
package app
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"crowsnest/internal/html"
|
"crowsnest/web/html"
|
||||||
"net/http"
|
"net/http"
|
||||||
"strconv"
|
"strconv"
|
||||||
)
|
)
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
package app
|
package app
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"crowsnest/internal/html"
|
"crowsnest/web/html"
|
||||||
"net/http"
|
"net/http"
|
||||||
)
|
)
|
||||||
|
|
||||||
Reference in New Issue
Block a user