add db migration
continuous-integration/drone/push Build is passing Details

This commit is contained in:
user-penguin 2023-09-13 18:32:55 +07:00
parent bc1bce306c
commit e33cf55a42
1 changed files with 6 additions and 0 deletions

View File

@ -50,6 +50,9 @@ steps:
- name: deploy
pull: if-not-exists
image: appleboy/drone-ssh
environment:
DB_PASS:
from_secret: DB_PASS
settings:
host:
from_secret: SSH_IP
@ -59,12 +62,15 @@ steps:
from_secret: SSH_KEY
port:
from_secret: SSH_PORT
envs: [ DB_PASS ]
script:
- cd /home/crab/deploys/butler_bot
- cp /etc/ssl/certs/ca-certificates.crt .
- mv build/ci/Dockerfile .
- mv deploy/docker-compose.yml .
- 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:
# scp bin, Dockerfile, docker-compose