Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SaifRehman/bf7d9793e3b90e4ed89a0c5a893dc4af to your computer and use it in GitHub Desktop.
Save SaifRehman/bf7d9793e3b90e4ed89a0c5a893dc4af to your computer and use it in GitHub Desktop.
Dockerfile-stack
FROM appsody/nodejs:0.3
RUN npm i -g webpack webpack-cli jest
ENV APPSODY_PROJECT_DIR=/project
ENV APPSODY_MOUNTS=/:/project/user-app
ENV APPSODY_DEPS=/project/user-app/node_modules
ENV APPSODY_WATCH_DIR=/project/user-app
ENV APPSODY_WATCH_IGNORE_DIR=/project/user-app/node_modules
ENV APPSODY_WATCH_REGEX="^.*.ts$"
ENV APPSODY_PREP="npm install --prefix user-app && npm audit fix --prefix user-app && webpack-cli --prefix user-app"
ENV APPSODY_RUN="webpack-cli && npm start"
ENV APPSODY_RUN_ON_CHANGE="webpack-cli && npm start"
ENV APPSODY_RUN_KILL=true
ENV APPSODY_DEBUG="npm run debug"
ENV APPSODY_DEBUG_ON_CHANGE="npm run debug"
ENV APPSODY_DEBUG_KILL=true
COPY ./LICENSE /licenses/
COPY ./project /project
COPY ./config /config
WORKDIR /project
RUN npm install && npm audit fix
ENV PORT=3000
ENV NODE_PATH=/project/user-app/node_modules
EXPOSE 3000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment