2020-06-25 10:11:33 -06:00
|
|
|
---
|
|
|
|
|
2020-06-25 10:01:06 -06:00
|
|
|
kind: pipeline
|
|
|
|
type: exec
|
2020-06-25 10:11:33 -06:00
|
|
|
name: deploy to prod
|
2020-06-25 10:01:06 -06:00
|
|
|
|
|
|
|
steps:
|
2020-06-26 09:06:05 -06:00
|
|
|
- name: composer
|
|
|
|
commands:
|
|
|
|
- composer install
|
2020-06-25 10:01:06 -06:00
|
|
|
- name: deploy to server
|
|
|
|
environment:
|
|
|
|
DEPLOY_COMMAND:
|
2020-06-25 10:11:33 -06:00
|
|
|
from_secret: deploy_command_prod
|
2020-06-25 10:01:06 -06:00
|
|
|
commands:
|
|
|
|
- $${DEPLOY_COMMAND}
|
|
|
|
|
|
|
|
trigger:
|
|
|
|
branch:
|
|
|
|
- main
|
2020-07-04 07:36:38 -06:00
|
|
|
event:
|
|
|
|
- push
|
2020-06-25 10:11:33 -06:00
|
|
|
|
|
|
|
---
|
|
|
|
|
|
|
|
kind: pipeline
|
|
|
|
type: exec
|
|
|
|
name: deploy to dev
|
|
|
|
|
|
|
|
steps:
|
2020-08-09 04:07:35 -06:00
|
|
|
- name: build docker container
|
2020-06-26 09:06:05 -06:00
|
|
|
commands:
|
2020-08-09 04:07:35 -06:00
|
|
|
- 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
|
2020-06-25 10:11:33 -06:00
|
|
|
environment:
|
2020-08-09 04:07:35 -06:00
|
|
|
TWITTER_API_AUTH:
|
|
|
|
from_secret: twitter_api_auth
|
2020-06-25 10:11:33 -06:00
|
|
|
commands:
|
2020-08-09 04:07:35 -06:00
|
|
|
- docker run -d -e "TWITTER_API_AUTH=$${TWITTER_API_AUTH}" --name keyoxide-web -h keyoxide --network dc_web keyoxide-web
|
2020-06-25 10:11:33 -06:00
|
|
|
|
|
|
|
trigger:
|
|
|
|
branch:
|
|
|
|
- dev
|
2020-07-04 07:36:38 -06:00
|
|
|
event:
|
|
|
|
- push
|