df/bff/Dockerfile
itsscb a9c53952de
Add Dockerfile for backend (#60)
* Add Dockerfile for backend
Fixes #57

* Add Dockerfile for backend
Fixes #57

* removes a temporary test relict
2023-10-02 20:41:29 +02:00

16 lines
331 B
Docker

# Build stage
FROM golang:1.21-alpine3.18 AS builder
WORKDIR /app
COPY . .
RUN go build -o main main.go
# Run stage
FROM alpine:3.18
WORKDIR /app
COPY --from=builder /app/main .
COPY app.env .
ENV DB_SOURCE=postgresql://root:secret@postgres:5432/df?sslmode=disable
COPY db/migration ./db/migration
EXPOSE 8080
CMD [ "/app/main" ]