Created
December 27, 2016 04:49
-
-
Save iDVB/023c67ea02609c12989411ce89b152fe to your computer and use it in GitHub Desktop.
This file contains hidden or 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
build | |
database.sqlite | |
node_modules | |
ncp-debug.log | |
npm-debug.log |
This file contains hidden or 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
version: "2" | |
services: | |
web: | |
build: . | |
volumes: | |
- ./:/app | |
ports: | |
- "3000:3000" | |
- "3001:3001" | |
- "3002:3002" | |
command: > | |
sh -c ' | |
if test -d node_modules; | |
then | |
echo node_modules_exists ; | |
else | |
cp -a /tmp/node_modules /app; | |
fi && | |
yarn start | |
' |
This file contains hidden or 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
FROM node:7.2.1-alpine | |
# install all prerequisites | |
RUN apk add --no-cache make gcc g++ python | |
WORKDIR /tmp | |
COPY package.json /tmp | |
COPY yarn.lock /tmp | |
# Global install yarn package manager | |
RUN npm set progress=false && \ | |
npm install -g --progress=false yarn && \ | |
yarn install | |
WORKDIR /app | |
COPY ./ /app | |
RUN cp -a /tmp/node_modules /app/ | |
CMD ["yarn", "start"] | |
EXPOSE 3000 | |
EXPOSE 3001 | |
EXPOSE 3002 | |
EXPOSE 5000 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment