-
Notifications
You must be signed in to change notification settings - Fork 0
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
1 parent
c402221
commit 7750272
Showing
5 changed files
with
53 additions
and
13 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 |
---|---|---|
|
@@ -23,4 +23,6 @@ build | |
coverage.html | ||
**/.docker-conf/** | ||
.* | ||
.data | ||
.data | ||
|
||
**/node_modules/** |
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,10 +1,48 @@ | ||
FROM node | ||
FROM node as build-ui | ||
|
||
WORKDIR /app | ||
|
||
RUN npm i tar | ||
RUN npm install -g create-react-app | ||
RUN npm install -g openapi | ||
|
||
COPY website /app | ||
COPY website/src /app/src | ||
COPY website/package.json /app | ||
COPY website/package-lock.json /app | ||
COPY website/public /app/public | ||
COPY website/tsconfig.json /app | ||
|
||
ENTRYPOINT ["bash"] | ||
COPY web/openapi/openapi.yml /app/openapi.yml | ||
RUN npm run build | ||
|
||
## Build | ||
FROM golang:1.20 AS build-backend | ||
|
||
WORKDIR /app | ||
|
||
COPY web/cmd ./cmd | ||
COPY web/internal ./internal | ||
COPY web/openapi ./openapi | ||
COPY web/go.mod ./go.mod | ||
COPY web/go.sum ./go.sum | ||
COPY web/Makefile ./Makefile | ||
|
||
RUN go mod download | ||
|
||
RUN make build | ||
|
||
## Deploy | ||
FROM centos:7 | ||
|
||
WORKDIR /app | ||
|
||
COPY web/openapi /app/openapi | ||
COPY --from=build-ui /app/build /app/public | ||
|
||
VOLUME /tmp | ||
|
||
EXPOSE 8080 | ||
|
||
COPY --from=build-backend /app/build/web-amd64-linux /app/web-amd64-linux | ||
|
||
ENTRYPOINT ["/app/web-amd64-linux"] |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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