Added Dockerfile for building server images
parent
8e86943b83
commit
9fd04082f7
@ -0,0 +1,13 @@
|
||||
# NodeJS
|
||||
node_modules/
|
||||
|
||||
# Server
|
||||
server
|
||||
|
||||
# Local Files
|
||||
.env
|
||||
*.local*
|
||||
|
||||
# Itself
|
||||
Dockerfile
|
||||
.dockerignore
|
@ -0,0 +1,18 @@
|
||||
FROM node:18 AS frontend-builder
|
||||
WORKDIR /frontend
|
||||
COPY ./_frontend .
|
||||
RUN npm install
|
||||
RUN npm run build
|
||||
|
||||
FROM golang:1.18-alpine AS server-builder
|
||||
WORKDIR /server
|
||||
COPY . .
|
||||
RUN go build -buildvcs=false -o storage-server -v .
|
||||
|
||||
FROM alpine:latest AS runner
|
||||
WORKDIR /app
|
||||
COPY --from=frontend-builder /frontend/dist ./_frontend/dist
|
||||
COPY ./scripts ./scripts
|
||||
COPY --from=server-builder /server/storage-server ./storage-server
|
||||
EXPOSE 4000
|
||||
CMD ["./storage-server"]
|
Loading…
Reference in New Issue