-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
23 changed files
with
5,278 additions
and
10,010 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,46 +1,21 @@ | ||
## server | ||
FROM golang:1.14 AS server-build-env | ||
|
||
WORKDIR /app | ||
|
||
COPY server/go.* ./server/ | ||
|
||
RUN go get -u github.com/go-bindata/go-bindata/... | ||
|
||
RUN cd server && go mod download | ||
|
||
## web | ||
FROM node:lts as web-build-env | ||
|
||
FROM node:lts as web-build | ||
WORKDIR /app | ||
|
||
COPY web/package.json ./web/ | ||
|
||
RUN cd web && npm i | ||
|
||
FROM web-build-env AS web-build | ||
|
||
COPY Makefile ./ | ||
|
||
COPY web/ ./web/ | ||
RUN corepack enable && make bootstrap-web && make build-web | ||
|
||
RUN make build-web | ||
|
||
FROM server-build-env AS server-build | ||
|
||
## server | ||
FROM golang:1.21 AS server-build | ||
WORKDIR /app | ||
COPY Makefile ./ | ||
|
||
COPY server/*.go ./server/ | ||
COPY server/ ./server/ | ||
COPY --from=web-build /app/build/static/ /app/build/static | ||
|
||
RUN make build-server | ||
RUN go install github.com/go-bindata/go-bindata/...@v3 | ||
RUN make bootstrap-server && make build-server | ||
|
||
FROM alpine | ||
|
||
WORKDIR /app | ||
|
||
EXPOSE 3300 | ||
|
||
COPY --from=server-build /app/build/server /app/server | ||
|
||
CMD [ "./server" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.