update docker file to build full app
This commit is contained in:
@@ -16,7 +16,7 @@ RUN go mod download
|
|||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
# Build with CGO enabled for SQLite
|
# Build with CGO enabled for SQLite
|
||||||
RUN CGO_ENABLED=1 GOOS=linux go build -o server main.go
|
RUN CGO_ENABLED=1 GOOS=linux go build -o server
|
||||||
|
|
||||||
# ------------------------------------------------------
|
# ------------------------------------------------------
|
||||||
# 2. Runtime Stage
|
# 2. Runtime Stage
|
||||||
@@ -30,10 +30,6 @@ WORKDIR /app
|
|||||||
|
|
||||||
# Copy binary and required files
|
# Copy binary and required files
|
||||||
COPY --from=builder /app/server .
|
COPY --from=builder /app/server .
|
||||||
COPY --from=builder /app/css ./css
|
|
||||||
COPY --from=builder /app/views ./views
|
|
||||||
COPY --from=builder /app/my_website.db ./
|
|
||||||
COPY --from=builder /app/data ./data
|
|
||||||
|
|
||||||
EXPOSE 8080
|
EXPOSE 8080
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user