From e3e49eac2180ebf615736c142b29b1ba0a7f0fe9 Mon Sep 17 00:00:00 2001 From: Simon Date: Fri, 20 Sep 2019 18:11:36 +0200 Subject: [PATCH] Fix docker and deployment scripts --- .drone.yml | 33 +++++++++++++++++++++++++++------ Dockerfile | 4 ++-- 2 files changed, 29 insertions(+), 8 deletions(-) diff --git a/.drone.yml b/.drone.yml index 6c9908c..c7b6cb3 100644 --- a/.drone.yml +++ b/.drone.yml @@ -1,6 +1,27 @@ -pipeline: - run-tests: - image: node:10.15 - commands: - - npm i - - npm test \ No newline at end of file +kind: pipeline +name: default + +steps: +- name: install + image: node:10.15-alpine + commands: + - npm install + +- name: deploy + image: plugins/docker + settings: + registry: registry.cliffbreak.de + repo: registry.cliffbreak.de/landingpage + username: + from_secret: docker_username + password: + from_secret: docker_password + when: + event: + - push + - tag + - deployment + +trigger: + branch: + - master \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 20ea905..1164720 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,8 +3,8 @@ FROM node:10.15-alpine WORKDIR /usr/src/app COPY package*.json ./ -RUN npm install +RUN npm install --production COPY . . - +CMD npm start \ No newline at end of file