Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions neon-branching-tutorial/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Dependencies
node_modules/

# Environment variables
.env
.env.local
.env.*.local

# Logs
logs/
*.log
npm-debug.log*

# Runtime data
pids/
*.pid
*.seed
*.pid.lock

# Coverage directory
coverage/

# Build output
dist/
build/

# IDE and editor files
.idea/
.vscode/
*.swp
*.swo
*~
.DS_Store

# Kubernetes secrets (never commit these!)
*-secret.yaml
db-secret.yaml

# Neon credentials
.neonctl
29 changes: 29 additions & 0 deletions neon-branching-tutorial/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
.PHONY: build deploy clean setup-neon-secret

IMAGE_NAME := signadot/neon-demo-users:latest

build:
docker build -t $(IMAGE_NAME) -f ./docker/users-service.Dockerfile ./pkg/users-service

deploy:
kubectl apply -f ./k8s

clean:
kubectl delete -f ./k8s --ignore-not-found

setup-neon-secret:
@echo "Creating Neon API credentials secret in signadot namespace..."
@read -p "Enter your Neon API key: " NEON_API_KEY; \
kubectl create secret generic neon-api-credentials \
--namespace=signadot \
--from-literal=NEON_API_KEY=$$NEON_API_KEY \
--dry-run=client -o yaml | kubectl apply -f -

setup-db-secret:
@echo "Creating database credentials secret..."
@read -p "Enter your Neon connection string: " DATABASE_URL; \
kubectl create secret generic users-db-credentials \
--from-literal=DATABASE_URL="$$DATABASE_URL" \
--dry-run=client -o yaml | kubectl apply -f -

all: build deploy
Loading