mirror of
https://gitlab.com/bmcgonag/get_my.git
synced 2026-03-27 00:08:49 +00:00
Added new Dockerfile for docker builds
This commit is contained in:
parent
0fe3bae5dd
commit
0dff270e82
2 changed files with 49 additions and 1 deletions
48
Dockerfile
Normal file
48
Dockerfile
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
FROM alpine:3.17
|
||||
|
||||
ENV NODE_VERSION=14.21.4
|
||||
ENV NODE_URL="https://static.meteor.com/dev-bundle-node-os/unofficial-builds/v${NODE_VERSION}/node-v${NODE_VERSION}-linux-x64.tar.gz"
|
||||
ENV DIR_NODE=/usr/local
|
||||
|
||||
RUN apk add --no-cache \
|
||||
libstdc++ \
|
||||
&& apk add --no-cache --virtual .build-deps-full \
|
||||
bash \
|
||||
binutils-gold \
|
||||
curl \
|
||||
g++ \
|
||||
gcc \
|
||||
gnupg \
|
||||
libgcc \
|
||||
linux-headers \
|
||||
make \
|
||||
python3 \
|
||||
ccache \
|
||||
xz
|
||||
|
||||
RUN echo $NODE_URL
|
||||
RUN curl -sSL "$NODE_URL" | tar -xz -C /usr/local/ && mv $DIR_NODE/node-v${NODE_VERSION}-linux-x64 $DIR_NODE/v$NODE_VERSION
|
||||
|
||||
# add node and npm to path so the commands are available
|
||||
ENV NODE_PATH $DIR_NODE/v$NODE_VERSION/lib/node_modules
|
||||
ENV PATH $DIR_NODE/v$NODE_VERSION/bin:$PATH
|
||||
|
||||
# confirm installation
|
||||
RUN node -v
|
||||
RUN npm -v
|
||||
|
||||
ENV MONGO_URL=mongodb://mongo:27017/get_my\
|
||||
ROOT_URL=http://localhost \
|
||||
PORT=3000 \
|
||||
MAIL_URL=smtp://USERNAME:PASSWORD@HOST:PORT
|
||||
|
||||
RUN mkdir -p /usr/src/get_my
|
||||
WORKDIR /usr/src/get_my
|
||||
COPY bundle/ /usr/src/get_my/
|
||||
|
||||
RUN cd /usr/src/get_my/programs/server/ \
|
||||
&& npm install
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
CMD [ "node", "main.js" ]
|
||||
Loading…
Add table
Add a link
Reference in a new issue