docker: Add pusher and dockerignore.

This commit is contained in:
William Floyd 2022-03-17 02:33:50 -05:00
parent 2c859595a8
commit 9345d486a5
Signed by untrusted user who does not match committer: william
GPG key ID: B3EEEDD81893CAF9
2 changed files with 14 additions and 0 deletions

3
.dockerignore Normal file
View file

@ -0,0 +1,3 @@
.git
**/*.hash
**/src

11
push.sh Executable file
View file

@ -0,0 +1,11 @@
#!/bin/bash
sudo docker build -t w-floyd/blog . || {
echo 'Failure to build'
exit
}
sudo docker save w-floyd/blog | bzip2 | pv | ssh "${1}" docker load
ssh "${1}" docker-compose -f /root/server-config/docker-compose.yml --project-directory /root/server-config up --remove-orphans -d
exit