-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Will add image on docker hub soon.
- Loading branch information
Showing
4 changed files
with
48 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
*.exe | ||
js/ | ||
css/ |
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,40 @@ | ||
FROM node:14-alpine AS node | ||
LABEL maintainer="Goavega Open Source Team <[email protected]>" | ||
ENV BUILD_DIR /home/ | ||
|
||
RUN set -ex && \ | ||
apk add yarn | ||
COPY ./ ${BUILD_DIR} | ||
WORKDIR ${BUILD_DIR}client | ||
RUN set -ex && \ | ||
yarn install && \ | ||
yarn prod | ||
|
||
FROM golang:1.14-alpine AS go | ||
ENV APP_DIR /var/www/ | ||
ENV BUILD_DIR /home/ | ||
RUN set -ex && \ | ||
mkdir -p ${APP_DIR}js/ && \ | ||
mkdir -p ${APP_DIR}css/ && \ | ||
mkdir -p ${APP_DIR}views/ | ||
COPY --from=node /home/js/* ${APP_DIR}js/ | ||
COPY --from=node /home/css/* ${APP_DIR}css/ | ||
COPY --from=node /home/views/* ${APP_DIR}views/ | ||
COPY ./ ${BUILD_DIR} | ||
WORKDIR ${BUILD_DIR} | ||
RUN set -ex && \ | ||
go build ./ && \ | ||
cp ./mustard ${APP_DIR} | ||
|
||
FROM alpine:latest | ||
ENV APP_DIR /var/www/ | ||
ENV PORT 80 | ||
|
||
COPY --from=go ${APP_DIR} ${APP_DIR} | ||
COPY ./dockersupport/start.sh /usr/local/bin/ | ||
WORKDIR ${APP_DIR} | ||
RUN set -ex && \ | ||
chmod u+x ./mustard && \ | ||
chmod u+x /usr/local/bin/start.sh | ||
EXPOSE ${PORT} | ||
CMD ["start.sh"] |
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 +1 @@ | ||
export const BaseUrl = "http://localhost:8090/"; | ||
export const BaseUrl = "/"; |
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,4 @@ | ||
#!/bin/sh | ||
echo 'INFO: starting mustard' | ||
cd ${APP_DIR} && ./mustard | ||
echo 'INFO: Nothing to see here, move along' |