diff --git a/build/ci/.drone.yml b/build/ci/.drone.yml index 6d76554..95a0326 100644 --- a/build/ci/.drone.yml +++ b/build/ci/.drone.yml @@ -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