Skip to content

Commit

Permalink
Merge branch 'release/v0.0.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
drnachio committed Apr 29, 2020
2 parents e7d3dc2 + a4fda07 commit a5dace6
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
17 changes: 14 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
FROM node:12-alpine
ENV NODE_ENV production
WORKDIR /usr/src/app
VOLUME ["/usr/src/app/server"]
LABEL Description="A2R API Watcher"
# Production packages install
COPY ["package.json", "package-lock.json*", "npm-shrinkwrap.json*", "./"]
RUN npm install --production --silent
COPY ./dist ./dist
# Copy the source code and build the solution
COPY . ./src
RUN cd ./src;npm install --silent;npm run build
# Copy de compiled version
RUN cp -r ./src/dist ./dist
# Remove the sources
RUN rm -rf ./src
# Enviroment por production
ENV NODE_ENV production
# Vulumes for mapping
VOLUME ["/usr/src/app/server"]
# Start command
CMD npm start
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
{
"name": "api-watcher",
"version": "0.0.2",
"version": "0.0.3",
"description": "API Watcher",
"engines": {
"node": ">=12"
},
"scripts": {
"build": "tsc",
"dev": "NODE_ENV=development ts-node-dev --debug --respawn --transpileOnly ./index.ts",
"docker-build": "rm -rf dist;npm run build;docker build --rm --pull -f \"./Dockerfile\" -t \"api-watcher:latest\" \".\"",
"docker-build": "docker build --rm --pull -f \"./Dockerfile\" -t \"api-watcher:latest\" \".\"",
"docker-start": "docker run -it -v $INIT_CWD/server:/usr/src/app/server api-watcher:latest",
"start": "node ./dist/index.js",
"lint": "npx eslint --config ./.eslintrc ./**/*.ts",
Expand Down

0 comments on commit a5dace6

Please sign in to comment.