mirror of
https://github.com/lemeow125/DRF_Template.git
synced 2024-11-17 04:09:25 +08:00
Update .woodpecker.yml
This commit is contained in:
parent
9b6ecc20e6
commit
16c45f8322
1 changed files with 2 additions and 5 deletions
|
@ -18,19 +18,16 @@ steps:
|
|||
- branch: master
|
||||
event: push
|
||||
commands:
|
||||
- mkdir -p /root/.ssh/ # Add SSH key to remote machine
|
||||
- mkdir -p /root/.ssh/
|
||||
- echo "$SSH_KEY" | tr -d '\r' > /root/.ssh/id_rsa
|
||||
- chmod 600 /root/.ssh/id_rsa
|
||||
- echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > /root/.ssh/config
|
||||
- ssh $"REMOTE_HOST" ' # SSH to remote machine and execute commands
|
||||
- ssh $"REMOTE_HOST" '
|
||||
cd "/mnt/nvme/files/docker projects/DRF-Template";
|
||||
# Pull latest image and reset the DB
|
||||
docker-compose -f docker-compose.demo.yml down;
|
||||
docker image rm git.keannu1.duckdns.org/keannu125/drf_template || true;
|
||||
docker volume rm drf_template_db_data || true;
|
||||
docker pull git.keannu1.duckdns.org/keannu125/drf_template:latest;
|
||||
# Download and overwrite docker-compose.demo.yml
|
||||
curl https://raw.githubusercontent.com/lemeow125/DRF_Template/master/docker-compose.demo.yml | tee docker-compose.demo.yml > /dev/null
|
||||
# Start with new configs
|
||||
docker compose -f docker-compose.demo.yml up -d;'
|
||||
secrets: [SSH_KEY, REMOTE_HOST]
|
||||
|
|
Loading…
Reference in a new issue