From c9279dce41cb177f6990a8e00439cbde7a9775a5 Mon Sep 17 00:00:00 2001 From: Yarmo Mackenbach Date: Sun, 9 Aug 2020 12:07:35 +0200 Subject: [PATCH] Update drone dev pipeline --- .drone.yml | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/.drone.yml b/.drone.yml index a747163..3686aab 100644 --- a/.drone.yml +++ b/.drone.yml @@ -28,15 +28,25 @@ type: exec name: deploy to dev steps: - - name: composer + - name: build docker container commands: - - composer install - - name: deploy to server + - docker build -t keyoxide/keyoxide:dev ./ + - name: push to docker hub + commands: + - docker push keyoxide/keyoxide:dev + - name: pull docker container + commands: + - docker pull keyoxide/keyoxide:dev + - name: stop and remove existing docker container + commands: + - docker stop keyoxide-web + - docker rm keyoxide-web + - name: run new docker container environment: - DEPLOY_COMMAND: - from_secret: deploy_command_dev + TWITTER_API_AUTH: + from_secret: twitter_api_auth commands: - - $${DEPLOY_COMMAND} + - docker run -d -e "TWITTER_API_AUTH=$${TWITTER_API_AUTH}" --name keyoxide-web -h keyoxide --network dc_web keyoxide-web trigger: branch: