Last active
January 6, 2024 14:32
-
-
Save AntonKosov/6fc56740ede8544f99b2988bb21f7852 to your computer and use it in GitHub Desktop.
Managing Docker Compose Services
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| run: | |
| @ls -1 -d */ | xargs -i sh -c 'cd {} && docker compose up -d' | |
| stop: | |
| @ls -1 -d */ | xargs -i sh -c 'cd {} && docker compose stop' | |
| # GPG_TTY must be defined: GPG_TTY=$(tty) make backup | |
| backup: | |
| @$(MAKE) stop | |
| @sudo tar -zcf - * | gpg --symmetric --cipher-algo aes256 -o backup-`date +%y-%m-%d`.tar.gz.gpg | |
| @$(MAKE) run | |
| upgrade: | |
| @$(MAKE) stop | |
| @ls -1 -d */ | xargs -i sh -c 'cd {} && docker compose build --pull' | |
| @$(MAKE) run |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment