Commit 9c246b66 authored by Jonas Heinrich's avatar Jonas Heinrich

update Makefile remote deploy script

parent 591dfd47
DOCKER_HOST="playground.pi"
SITE_URL="beta.saai.digital"
PROJECT_NAME="web-wordpress-kit"
CONTAINER_NAME_WORDPRESS="${PROJECT_NAME}_wordpress"
CONTAINER_NAME_DB="${PROJECT_NAME}_db"
LISTENING_PORT=8080
DOCKER_HOST=playground.pi
SITE_URL=beta.saai.digital
PROJECT_NAME=web-wordpress-kit
CONTAINER_NAME_WORDPRESS=${PROJECT_NAME}_wordpress
CONTAINER_NAME_DB=${PROJECT_NAME}_db
docker_deploy:
docker run --rm -it \
-v /tmp/backup:/backup -v /var/lib/docker:/docker \
-v $(shell pwd)/kit:/docker/volumes/${CONTAINER_NAME_WORDPRESS}/_data/wp-content/themes/kit \
alpine:edge tar cpfz /backup/volumes.tgz /docker/volumes/
alpine:edge tar cpfz /backup/volumes.tgz /docker/volumes/${CONTAINER_NAME_WORDPRESS} /docker/volumes/${CONTAINER_NAME_DB}
rsync --progress /tmp/backup/volumes.tgz ${DOCKER_HOST}:/tmp/
-DOCKER_HOST="ssh://${DOCKER_HOST}" docker stop ${CONTAINER_NAME_WORDPRESS}_1 ${CONTAINER_NAME_DB}_1
......
......@@ -4,7 +4,7 @@ services:
wordpress:
image: wordpress
restart: always
restart: on-failure
ports:
- 8080:80
environment:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment