-
Notifications
You must be signed in to change notification settings - Fork 832
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #425 from Qihoo360/feature/frontend-separate
Feature/frontend separate
- Loading branch information
Showing
23 changed files
with
334 additions
and
310 deletions.
There are no files selected for viewing
This file was deleted.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# requiring Docker 17.05 or higher on the daemon and client | ||
# see https://docs.docker.com/develop/develop-images/multistage-build/ | ||
# BUILD COMMAND : | ||
# docker --build-arg RELEASE_VERSION=v1.0.0 -t infra/wayne:v1.0.0 . | ||
|
||
# build server | ||
FROM 360cloud/wayne-server-builder:v1.0.1 as backend | ||
|
||
COPY go.mod /go/src/github.com/Qihoo360/wayne | ||
COPY go.sum /go/src/github.com/Qihoo360/wayne | ||
|
||
COPY src/backend /go/src/github.com/Qihoo360/wayne/src/backend | ||
|
||
RUN export GO111MODULE=on && \ | ||
export GOPROXY=https://goproxy.io && \ | ||
cd /go/src/github.com/Qihoo360/wayne/src/backend && \ | ||
bee generate docs && \ | ||
bee pack -o /_build | ||
|
||
# build release image | ||
FROM 360cloud/centos:7 | ||
|
||
RUN ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime | ||
|
||
COPY --from=backend /_build/backend.tar.gz /opt/wayne/ | ||
|
||
WORKDIR /opt/wayne/ | ||
|
||
RUN tar -xzvf backend.tar.gz | ||
|
||
CMD ["./backend"] |
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# requiring Docker 17.05 or higher on the daemon and client | ||
# see https://docs.docker.com/develop/develop-images/multistage-build/ | ||
# BUILD COMMAND : | ||
# docker --build-arg RELEASE_VERSION=v1.0.0 -t infra/wayne:v1.0.0 . | ||
|
||
# build ui | ||
FROM 360cloud/wayne-ui-builder:v1.0.1 as frontend | ||
|
||
COPY src/frontend /workspace | ||
|
||
RUN cd /workspace && \ | ||
npm config set registry https://registry.npm.taobao.org && \ | ||
npm install && \ | ||
npm run build | ||
|
||
# build server | ||
FROM openresty/openresty:1.15.8.1-1-centos | ||
|
||
COPY --from=frontend /workspace/dist/ /usr/local/openresty/nginx/html/ | ||
|
||
CMD ["/usr/local/openresty/bin/openresty", "-g", "daemon off;"] |
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
This file was deleted.
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
Oops, something went wrong.