add env files
This commit is contained in:
@@ -9,8 +9,9 @@ COPY go.mod go.sum ./
|
||||
# Download dependencies
|
||||
RUN go mod download
|
||||
|
||||
# Copy source code
|
||||
# Copy source code and environment files
|
||||
COPY *.go ./
|
||||
COPY .env* ./
|
||||
|
||||
# Build the application
|
||||
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o main .
|
||||
@@ -43,6 +44,9 @@ WORKDIR /root/
|
||||
# Copy the Go binary from go-builder stage
|
||||
COPY --from=go-builder /app/main .
|
||||
|
||||
# Copy environment files from go-builder stage
|
||||
COPY --from=go-builder /app/.env* ./
|
||||
|
||||
# Copy the React build from frontend-builder stage
|
||||
COPY --from=frontend-builder /app/frontend/build ./frontend/build
|
||||
|
||||
|
||||
Reference in New Issue
Block a user