add db migration
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
bc1bce306c
commit
e33cf55a42
|
@ -50,6 +50,9 @@ steps:
|
||||||
- name: deploy
|
- name: deploy
|
||||||
pull: if-not-exists
|
pull: if-not-exists
|
||||||
image: appleboy/drone-ssh
|
image: appleboy/drone-ssh
|
||||||
|
environment:
|
||||||
|
DB_PASS:
|
||||||
|
from_secret: DB_PASS
|
||||||
settings:
|
settings:
|
||||||
host:
|
host:
|
||||||
from_secret: SSH_IP
|
from_secret: SSH_IP
|
||||||
|
@ -59,12 +62,15 @@ steps:
|
||||||
from_secret: SSH_KEY
|
from_secret: SSH_KEY
|
||||||
port:
|
port:
|
||||||
from_secret: SSH_PORT
|
from_secret: SSH_PORT
|
||||||
|
envs: [ DB_PASS ]
|
||||||
script:
|
script:
|
||||||
- cd /home/crab/deploys/butler_bot
|
- cd /home/crab/deploys/butler_bot
|
||||||
- cp /etc/ssl/certs/ca-certificates.crt .
|
- cp /etc/ssl/certs/ca-certificates.crt .
|
||||||
- mv build/ci/Dockerfile .
|
- mv build/ci/Dockerfile .
|
||||||
- mv deploy/docker-compose.yml .
|
- mv deploy/docker-compose.yml .
|
||||||
- rm -r build deploy
|
- rm -r build deploy
|
||||||
|
- goose -allow-missing -dir ./migrations postgres "user=crab password=$${DB_PASS} dbname=butler host=localhost port=5432 sslmode=disable" up
|
||||||
|
- docker-compose up -d --force-recreate
|
||||||
|
|
||||||
# TODO:
|
# TODO:
|
||||||
# scp bin, Dockerfile, docker-compose
|
# scp bin, Dockerfile, docker-compose
|
||||||
|
|
Loading…
Reference in New Issue