deploy production environment

This commit is contained in:
talksik
2026-03-29 11:44:07 -07:00
parent 48c73893b3
commit 43c0a217c6
9 changed files with 180 additions and 24 deletions
+15 -20
View File
@@ -8,13 +8,13 @@ generate:
test:
go test -json ./... | docker run -i ghcr.io/gotesttools/gotestfmt:latest
.PHONY: migrate-dev-db
migrate-dev-db:
.PHONY: migrate-dev
migrate-dev:
./migrate_dev.sh
# .PHONY: migrate-prod-db
# migrate-prod-db:
# ./migrate_prod.sh
.PHONY: migrate-prod
migrate-prod:
./migrate_prod.sh
# ex: make create-migration ARG="create_users_table"
create-migration:
@@ -28,23 +28,18 @@ dev-database:
--context dev \
--command -- /bin/bash -c "psql \$$LLINK_POSTGRES_CONNECTION_URL"
# prod-database:
# kubectl run postgres-client \
# --rm -it --image=postgres:latest \
# --env="LLINK_POSTGRES_CONNECTION_URL=$$(kubectl get secret shared-secrets -o jsonpath='{.data.LLINK_POSTGRES_CONNECTION_URL}' --context prod | base64 --decode)" \
# --context prod \
# --command -- /bin/bash -c "psql \$$LLINK_POSTGRES_CONNECTION_URL"
prod-database:
kubectl run postgres-client \
--rm -it --image=postgres:latest \
--env="LLINK_POSTGRES_CONNECTION_URL=$$(kubectl get secret shared-secrets -o jsonpath='{.data.LLINK_POSTGRES_CONNECTION_URL}' --context prod | base64 --decode)" \
--context prod \
--command -- /bin/bash -c "psql \$$LLINK_POSTGRES_CONNECTION_URL"
.PHONY: deploy-dev
deploy-dev: generate test
./deploy_dev.sh
# .PHONY: release
# deploy-prod: generate test
# # Check for any changes (both staged and unstaged)
# @if [ -n "$(git status --porcelain)" ]; then \
# echo "Error: You have uncommitted changes in your Git repository."; \
# exit 1; \
# fi
# ./deploy_prod.sh
#
.PHONY: deploy-prod
deploy-prod: generate test
./deploy_prod.sh