Compare commits
No commits in common. "5c3b48859a3382ca87866b4e2f2f13de09da6f6f" and "cd4652401927c542aca14c197069c966c3a5d72f" have entirely different histories.
5c3b48859a
...
cd46524019
2
.gitignore
vendored
2
.gitignore
vendored
@ -1,3 +1 @@
|
|||||||
.vscode
|
.vscode
|
||||||
data
|
|
||||||
logs
|
|
35
Dockerfile
35
Dockerfile
@ -1,35 +0,0 @@
|
|||||||
# to build mydraftcc
|
|
||||||
FROM alpine:latest as builder
|
|
||||||
RUN apk add --no-cache nodejs npm git bash
|
|
||||||
RUN git clone https://git.mytinydc.com/Mytinydc/mydraftcc-nodejs-server.git \
|
|
||||||
&& cd mydraftcc-nodejs-server \
|
|
||||||
&& git submodule update --init
|
|
||||||
WORKDIR /mydraftcc-nodejs-server
|
|
||||||
# If you want to patch with "optional"
|
|
||||||
ARG PATCHOPTIONS
|
|
||||||
RUN ./patch.sh "${PATCHOPTIONS}"
|
|
||||||
RUN cd ui && npm install && npm run build
|
|
||||||
|
|
||||||
# Final image server and built ui from previous step
|
|
||||||
FROM alpine:latest as main
|
|
||||||
RUN apk add --no-cache nodejs npm
|
|
||||||
COPY --from=builder /mydraftcc-nodejs-server/server /
|
|
||||||
COPY --from=builder /mydraftcc-nodejs-server/ui/build /public
|
|
||||||
RUN npm install
|
|
||||||
|
|
||||||
# Volumes mounpoint
|
|
||||||
RUN mkdir /data /logs
|
|
||||||
##VOLUME logs data
|
|
||||||
# run with user/group 1000
|
|
||||||
USER 1000:1000
|
|
||||||
# exposed port
|
|
||||||
EXPOSE 4000
|
|
||||||
# Env Vars
|
|
||||||
ENV IPADDRESS=0.0.0.0
|
|
||||||
ENV PORT=4000
|
|
||||||
# Storage: maximum size of the drawing file
|
|
||||||
# (2Mo : 2 * 1024 * 1024) = 2097152
|
|
||||||
ENV JSONMAXSIZE=2097152
|
|
||||||
|
|
||||||
|
|
||||||
CMD ["/usr/bin/node","/app.js"]
|
|
2
patch.sh
2
patch.sh
@ -6,7 +6,7 @@
|
|||||||
# So default is keeping, to remove from source, execute :
|
# So default is keeping, to remove from source, execute :
|
||||||
# ./patch.sh "optional"
|
# ./patch.sh "optional"
|
||||||
##############################################################
|
##############################################################
|
||||||
echo "Option $1"
|
|
||||||
echo "[INFO]Starting applying patches..."
|
echo "[INFO]Starting applying patches..."
|
||||||
|
|
||||||
## required for nodejs-server
|
## required for nodejs-server
|
||||||
|
@ -11,8 +11,6 @@ NODEJS="/usr/bin/nodejs"
|
|||||||
if [ ! -f "$NODEJS" ];then
|
if [ ! -f "$NODEJS" ];then
|
||||||
NODEJS="/usr/bin/node"
|
NODEJS="/usr/bin/node"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
npm install
|
|
||||||
## Start application
|
## Start application
|
||||||
# Parameters
|
# Parameters
|
||||||
# listening ip address
|
# listening ip address
|
||||||
|
Reference in New Issue
Block a user