Last active
March 27, 2021 01:16
-
-
Save kachar/3dbbef834aae195da8294fa2a5457fc3 to your computer and use it in GitHub Desktop.
https://taskfile.dev Recepies
This file contains 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
# https://taskfile.dev | |
# sudo snap install task --classic | |
version: "3" | |
tasks: | |
ps: docker-compose ps | |
up: docker-compose up -d {{- .SERVICE}} | |
dc: docker-compose {{.CMD}} | |
build: docker-compose {{.CACHE -}} {{.SERVICE}} | |
exec: docker-compose exec {{.SERVICE}} {{.CLI_ARGS}} | |
logs: docker-compose logs -f {{.SERVICE}} | |
rebuild: | |
cmds: | |
- docker-compose build {{.SERVICE}} | |
- docker-compose stop {{.SERVICE}} | |
- docker-compose up -d {{.SERVICE}} | |
- docker-compose logs -f {{.SERVICE}} |
This file contains 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
{ | |
"scripts": { | |
"psql": "docker-compose exec pg-db psql -U postgres -d app" | |
} | |
} |
This file contains 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
# https://taskfile.dev | |
# sudo snap install task --classic | |
version: "3" | |
dotenv: [".env"] | |
vars: | |
GIT_COMMIT: | |
sh: git log -n 1 --format=%h | |
includes: | |
docker: ./deploy/DockerTasks.yml | |
tasks: | |
psql: | |
- task: docker:exec | |
vars: | |
SERVICE: "{{.DB_HOST}}" | |
CLI_ARGS: "psql -U {{.DB_USER}} -d {{.DB_NAME}} {{.CMD}}" | |
psql:exec: | |
- task: psql | |
vars: { CMD: "-c '{{.QUERY}}'" } | |
install:landing: yarn --cwd web/landing | |
rebuild:landing: [task: docker:rebuild, vars: { SERVICE: landing }] | |
install:frontend: yarn --cwd web/frontend | |
rebuild:frontend: [task: docker:rebuild, vars: { SERVICE: frontend }] | |
ps: | |
cmds: | |
- echo {{.DOMAIN}} | |
- task: docker:ps |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment