add seed binary to Docker build and expose frontend port 80

This commit is contained in:
Egor Pozharov
2026-04-16 14:11:53 +06:00
parent 1bf5d1afd6
commit c77518b34a
2 changed files with 5 additions and 3 deletions

View File

@@ -14,7 +14,8 @@ RUN go mod download
COPY . . COPY . .
# Build the application # 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 # Stage 2: Production
FROM alpine:latest AS production FROM alpine:latest AS production
@@ -25,6 +26,7 @@ WORKDIR /app
# Copy binary from builder # Copy binary from builder
COPY --from=builder /app/api . COPY --from=builder /app/api .
COPY --from=builder /app/seed .
# Copy migrations # Copy migrations
COPY internal/db/migrations ./migrations COPY internal/db/migrations ./migrations

View File

@@ -31,8 +31,8 @@ services:
frontend: frontend:
image: ${GITEA_REGISTRY}/delivery-tracker/frontend:latest image: ${GITEA_REGISTRY}/delivery-tracker/frontend:latest
expose: ports:
- "80" - "80:80"
depends_on: depends_on:
- backend - backend
restart: unless-stopped restart: unless-stopped