Files
twitter-client/Taskfile.yml
T

71 lines
2.0 KiB
YAML

# yaml-language-server: $schema=https://taskfile.dev/schema.json
version: '3'
tasks:
docker-build:
desc: Build the Docker image
cmd: doppler run -- docker compose build
docker-up:
desc: Start the Docker container
cmd: doppler run --config dev -- docker compose up -d
docker-down:
desc: Stop and remove the Docker container
cmd: docker compose down
docker-rebuild:
desc: Rebuild the Docker image and restart the container
cmd: doppler run --config dev -- docker compose up -d --build
docker-login:
desc: Log in to Docker Hub
cmd: doppler run --config prd -- bash -c 'echo $CR_PAT | docker login -u rmcampos --password-stdin'
docker-push:
desc: Push the Docker image to Docker Hub
cmd: docker push rmcampos/twitter-backend:latest
terraform-deploy:
desc: Deploy the infrastructure using Terraform
cmd: |
task terraform-plan && \
task terraform-apply
terraform-init:
desc: Initialize Terraform
cmd: |
cd terraform
doppler run --config prd -- terraform init
terraform-plan:
desc: Generate and show an execution plan
cmd: |
cd terraform
terraform validate
terraform fmt -check -diff
doppler run --config prd -- bash -c '
TF_VAR_app_consumer_key=${APP_CONSUMER_KEY} \
TF_VAR_app_consumer_key_secret=${APP_CONSUMER_KEY_SECRET} \
TF_VAR_app_access_token=${APP_ACCESS_TOKEN} \
TF_VAR_app_access_token_secret=${APP_ACCESS_TOKEN_SECRET} \
TF_VAR_app_password=${APP_PASSWORD} \
TF_VAR_app_secret=${APP_SECRET} \
terraform plan -input=false -out=tfplan
'
terraform-apply:
desc: Apply the changes required to reach the desired state of the configuration
cmd: |
cd terraform
doppler run --config prd -- terraform apply -input=false tfplan
vercel-deploy:
desc: Deploy the frontend to Vercel
cmd: |
cd frontend
doppler run --config prd -- \
vercel --prod \
--env VITE_API_URL=${VITE_API_URL} \
--yes