feat(backend/infra): update Woodpecker config for registry.lrhdev.dk
- Configure docker-build stage to push to registry.lrhdev.dk - Add deploy stage with SSH deployment to deutsch.lrhdev.dk - Add detailed comments for Woodpecker configuration - Document required secrets (docker_username, docker_password, SSH_PRIVATE_KEY) Generated by Mistral Vibe. Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
parent
dd147a2c86
commit
f63fc627e3
1 changed files with 38 additions and 10 deletions
|
|
@ -28,8 +28,8 @@ pipeline:
|
||||||
settings:
|
settings:
|
||||||
dockerfile: GermanApp/Dockerfile
|
dockerfile: GermanApp/Dockerfile
|
||||||
context: GermanApp
|
context: GermanApp
|
||||||
repo: git.lrhdev.dk/lasserh/deutschlernen
|
registry: registry.lrhdev.dk
|
||||||
registry: git.lrhdev.dk
|
repo: registry.lrhdev.dk/lasserh/deutschlernen
|
||||||
tags:
|
tags:
|
||||||
- latest
|
- latest
|
||||||
- ${CI_COMMIT_SHA:0:8}
|
- ${CI_COMMIT_SHA:0:8}
|
||||||
|
|
@ -45,13 +45,19 @@ pipeline:
|
||||||
status:
|
status:
|
||||||
- success
|
- success
|
||||||
|
|
||||||
# Deploy stage (placeholder - customize for your deployment)
|
# Deploy stage
|
||||||
deploy:
|
deploy:
|
||||||
image: alpine
|
image: alpine
|
||||||
commands:
|
commands:
|
||||||
- echo "Deployment step"
|
- echo "Deploying to deutsch.lrhdev.dk..."
|
||||||
- echo "Add your deployment commands here"
|
- apk add --no-cache openssh-client
|
||||||
- echo "Example: ssh user@deutsch.lrhdev.dk 'cd /path/to/app && docker-compose pull && docker-compose up -d'"
|
- mkdir -p ~/.ssh
|
||||||
|
- echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa
|
||||||
|
- chmod 600 ~/.ssh/id_rsa
|
||||||
|
- ssh-keyscan deutsch.lrhdev.dk >> ~/.ssh/known_hosts
|
||||||
|
- ssh root@deutsch.lrhdev.dk "cd /path/to/app && docker-compose pull backend && docker-compose up -d backend"
|
||||||
|
secrets:
|
||||||
|
- SSH_PRIVATE_KEY
|
||||||
when:
|
when:
|
||||||
# Only deploy on main branch after successful docker-build
|
# Only deploy on main branch after successful docker-build
|
||||||
branch:
|
branch:
|
||||||
|
|
@ -59,7 +65,29 @@ pipeline:
|
||||||
status:
|
status:
|
||||||
- success
|
- success
|
||||||
|
|
||||||
# Woodpecker uses YAML similar to Drone CI
|
# ============================================
|
||||||
# Secrets need to be configured in the Woodpecker UI:
|
# WOODPECKER CONFIGURATION NOTES
|
||||||
# - docker_username: Your Docker registry username
|
# ============================================
|
||||||
# - docker_password: Your Docker registry password/token
|
#
|
||||||
|
# Required Secrets (configure in Woodpecker UI):
|
||||||
|
# --------------------------------------------
|
||||||
|
# 1. docker_username - Your registry username for registry.lrhdev.dk
|
||||||
|
# 2. docker_password - Your registry password for registry.lrhdev.dk
|
||||||
|
# 3. SSH_PRIVATE_KEY - SSH private key for deploying to deutsch.lrhdev.dk
|
||||||
|
#
|
||||||
|
# Registry Configuration:
|
||||||
|
# -----------------------
|
||||||
|
# - Registry URL: registry.lrhdev.dk
|
||||||
|
# - Repository: registry.lrhdev.dk/lasserh/deutschlernen
|
||||||
|
# - Images will be tagged as: latest and <short-commit-hash>
|
||||||
|
#
|
||||||
|
# Deployment:
|
||||||
|
# ----------
|
||||||
|
# The deploy stage connects via SSH to deutsch.lrhdev.dk and:
|
||||||
|
# 1. Pulls the latest backend image
|
||||||
|
# 2. Restarts the backend container
|
||||||
|
#
|
||||||
|
# Customize the deploy command to match your docker-compose setup.
|
||||||
|
# If you use a different path or service name, update the ssh command.
|
||||||
|
#
|
||||||
|
# ============================================
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue