Prepare for deployment
This commit is contained in:
parent
f85758ef33
commit
d440d85dc1
7 changed files with 79 additions and 9 deletions
24
Dockerfile
24
Dockerfile
|
|
@ -1,18 +1,30 @@
|
|||
FROM golang:alpine as gobuild
|
||||
FROM node:17-alpine as nodebuild
|
||||
|
||||
WORKDIR /ui
|
||||
|
||||
RUN apk --no-cache add python2 build-base
|
||||
|
||||
COPY ui/ .
|
||||
|
||||
RUN npm install --network-timeout=100000 && \
|
||||
npm run build
|
||||
|
||||
|
||||
FROM golang:1-alpine as gobuild
|
||||
|
||||
RUN apk add --no-cache go-bindata
|
||||
|
||||
WORKDIR /go/src/git.nemunai.re/atsebay.t
|
||||
|
||||
COPY *.go go.mod go.sum ./
|
||||
COPY htdocs/ ./htdocs/
|
||||
COPY --from=nodebuild /ui/build ui/build
|
||||
|
||||
RUN go generate -v && \
|
||||
go get -d -v && \
|
||||
go build -v -ldflags="-s -w"
|
||||
RUN go get -d -v && \
|
||||
go generate -v && \
|
||||
go build -v -ldflags="-s -w" -o atsebay.t
|
||||
|
||||
|
||||
FROM alpine
|
||||
FROM alpine:3.15
|
||||
|
||||
EXPOSE 8081
|
||||
|
||||
|
|
|
|||
Reference in a new issue