add seed binary to Docker build and expose frontend port 80
This commit is contained in:
@@ -14,7 +14,8 @@ RUN go mod download
|
||||
COPY . .
|
||||
|
||||
# Build the application
|
||||
RUN CGO_ENABLED=0 GOOS=linux go build -o api ./cmd/api
|
||||
RUN CGO_ENABLED=0 GOOS=linux go build -o api ./cmd/api && \
|
||||
CGO_ENABLED=0 GOOS=linux go build -o seed ./cmd/seed
|
||||
|
||||
# Stage 2: Production
|
||||
FROM alpine:latest AS production
|
||||
@@ -25,6 +26,7 @@ WORKDIR /app
|
||||
|
||||
# Copy binary from builder
|
||||
COPY --from=builder /app/api .
|
||||
COPY --from=builder /app/seed .
|
||||
|
||||
# Copy migrations
|
||||
COPY internal/db/migrations ./migrations
|
||||
|
||||
@@ -31,8 +31,8 @@ services:
|
||||
|
||||
frontend:
|
||||
image: ${GITEA_REGISTRY}/delivery-tracker/frontend:latest
|
||||
expose:
|
||||
- "80"
|
||||
ports:
|
||||
- "80:80"
|
||||
depends_on:
|
||||
- backend
|
||||
restart: unless-stopped
|
||||
|
||||
Reference in New Issue
Block a user