mirror of
https://codeberg.org/keyoxide/keyoxide-web.git
synced 2024-12-22 23:09:29 -07:00
Add pipelines for stable to drone
This commit is contained in:
parent
d26f4803f1
commit
956ce07ef9
1 changed files with 31 additions and 9 deletions
40
.drone.yml
40
.drone.yml
|
@ -1,19 +1,41 @@
|
||||||
---
|
---
|
||||||
|
|
||||||
|
kind: pipeline
|
||||||
|
name: build-stable-container
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: docker
|
||||||
|
image: plugins/docker
|
||||||
|
settings:
|
||||||
|
username:
|
||||||
|
from_secret: docker_username
|
||||||
|
password:
|
||||||
|
from_secret: docker_password
|
||||||
|
repo: keyoxide/keyoxide
|
||||||
|
tags: stable
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
type: exec
|
type: exec
|
||||||
name: deploy-prod
|
name: deploy-stable
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: composer
|
- name: pull docker container
|
||||||
commands:
|
commands:
|
||||||
- composer install
|
- docker pull keyoxide/keyoxide:stable
|
||||||
- name: deploy to server
|
- name: stop and remove existing docker container
|
||||||
|
commands:
|
||||||
|
- docker stop keyoxide || true && docker rm keyoxide || true
|
||||||
|
- name: run new docker container
|
||||||
environment:
|
environment:
|
||||||
DEPLOY_COMMAND:
|
TWITTER_API_AUTH:
|
||||||
from_secret: deploy_command_prod
|
from_secret: twitter_api_auth
|
||||||
commands:
|
commands:
|
||||||
- $${DEPLOY_COMMAND}
|
- docker run -d -e "TWITTER_API_AUTH=$${TWITTER_API_AUTH}" --name keyoxide -h keyoxide --network dc_web keyoxide/keyoxide:stable
|
||||||
|
|
||||||
|
depends_on:
|
||||||
|
- build-stable-container
|
||||||
|
|
||||||
trigger:
|
trigger:
|
||||||
branch:
|
branch:
|
||||||
|
@ -49,13 +71,13 @@ steps:
|
||||||
- docker pull keyoxide/keyoxide:dev
|
- docker pull keyoxide/keyoxide:dev
|
||||||
- name: stop and remove existing docker container
|
- name: stop and remove existing docker container
|
||||||
commands:
|
commands:
|
||||||
- docker stop keyoxide-web || true && docker rm keyoxide-web || true
|
- docker stop keyoxide-dev || true && docker rm keyoxide-dev || true
|
||||||
- name: run new docker container
|
- name: run new docker container
|
||||||
environment:
|
environment:
|
||||||
TWITTER_API_AUTH:
|
TWITTER_API_AUTH:
|
||||||
from_secret: twitter_api_auth
|
from_secret: twitter_api_auth
|
||||||
commands:
|
commands:
|
||||||
- docker run -d -e "TWITTER_API_AUTH=$${TWITTER_API_AUTH}" --name keyoxide-web -h keyoxide --network dc_web keyoxide/keyoxide:dev
|
- docker run -d -e "TWITTER_API_AUTH=$${TWITTER_API_AUTH}" --name keyoxide-dev -h keyoxide --network dc_web keyoxide/keyoxide:dev
|
||||||
|
|
||||||
depends_on:
|
depends_on:
|
||||||
- build-dev-container
|
- build-dev-container
|
||||||
|
|
Loading…
Reference in a new issue