compose:
	cat ./env/vps.txt | xargs ./bin/docker-setup.sh
swarm:
	cat ./env/vps.txt | STACK=vps xargs ./bin/docker-setup.sh
merge:
	./bin/docker-setup.sh merge vps
mswarm: merge
	docker stack deploy -c stacks/docker-compose.yml vps
down:
	docker stack rm vps
pull:
	for file in services/*; do docker-compose -f $$file pull; done
export:
	7z a -p data.7z data
import:
	7z x -p data.7z
sign:
	gpg --encrypt --sign --recipient 'marc@marcpartensky.com' data.7z
	# rm data.tgz
networks:
	docker network create --attachable caddy || true
	docker network create --attachable ldap || true
	docker network create --attachable postgres || true
	docker network create --attachable mongo || true
	docker network create --attachable vpn || true
	docker network create --attachable redis || true
	docker network create --subnet 172.22.1.0/24 --gateway 172.22.1.1 --attachable mailcow || true
	docker network create --subnet 10.22.69.0/24 --gateway 10.22.69.1 --attachable pritunl || true
node:
	docker node update --label-add net=web contabo
	docker node update --label-add net=none tower
