Automated CI/CD pipeline for Tesslate Studio using Woodpecker CI. This service automatically deploys updates to your production environment when code is pushed to the develop branch.
- Automated Deployments: Push to
developbranch triggers automatic deployment - Database Migrations: Runs Alembic migrations automatically before deployment
- Health Checks: Verifies deployment success (frontend, API, database, containers)
- Rollback Support: Quick rollback to previous version if deployment fails
- Web Interface: Monitor deployments through Woodpecker CI dashboard
- GitHub Integration: Uses GitHub OAuth for authentication
- Zero-Downtime: Containers are rebuilt and restarted without service interruption
- Docker (version 20.10+)
- Docker Compose (version 2.0+)
- GitHub Account with admin access to TesslateAI/Tesslate-Studio
- Tesslate Studio already deployed and running
If you cloned this repository:
cd TestDeployService./setup.shThe setup script will:
- Check for required dependencies (Docker, Docker Compose)
- Create environment configuration file
- Pull Docker images
- Optionally install systemd service
- Start Woodpecker CI
- Go to GitHub Settings > Developer settings > OAuth Apps
- Click "New OAuth App"
- Fill in the details:
- Application name:
Woodpecker CI - Tesslate Studio - Homepage URL:
http://your-server-ip:3001 - Authorization callback URL:
http://your-server-ip:3001/authorize
- Application name:
- Click "Register application"
- Copy the Client ID and generate a Client Secret
- Edit
.envfile and add these values:WOODPECKER_GITHUB_CLIENT=your_client_id_here WOODPECKER_GITHUB_SECRET=your_client_secret_here WOODPECKER_ADMIN=your_github_username
Edit .env file with your specific configuration:
nano .envRequired values:
WOODPECKER_HOST: Public URL for Woodpecker CI (e.g.,http://your-server:3001)WOODPECKER_ADMIN: Your GitHub usernameWOODPECKER_GITHUB_CLIENT: OAuth App Client ID from step 3WOODPECKER_GITHUB_SECRET: OAuth App Client Secret from step 3WOODPECKER_AGENT_SECRET: Auto-generated shared secret
docker compose up -dOpen your browser and navigate to:
http://your-server-ip:3001
Click "Login with GitHub" and authorize the application.
- Click on your user icon in Woodpecker CI
- Navigate to "Repositories"
- Find "TesslateAI/Tesslate-Studio"
- Click "Enable" to activate CI/CD for this repository
Push a commit to the develop branch:
cd /path/to/Tesslate-Studio
git checkout develop
# Make some changes
git commit -am "Test deployment pipeline"
git push origin developWatch the deployment progress in Woodpecker CI dashboard!
TestDeployService/
βββ README.md # This file
βββ docker-compose.yml # Woodpecker CI stack configuration
βββ .env # Environment variables (not in git)
βββ .env.example # Environment template
βββ setup.sh # Automated setup script
βββ woodpecker/ # Woodpecker data directory (not in git)
βββ scripts/
β βββ deploy.sh # Main deployment script
β βββ health-check.sh # Post-deployment health checks
β βββ rollback.sh # Emergency rollback script
βββ systemd/
βββ woodpecker.service # Systemd service definition
When you push to the develop branch, the following automated process runs:
1. π₯ Clone Latest Code
ββ Pull from GitHub develop branch
2. ποΈ Database Migrations
ββ Run: alembic upgrade head
3. π¨ Build Images
ββ Rebuild orchestrator and app containers
4. π Deploy
ββ Restart containers with new code
5. β
Health Checks
ββ Container status
ββ Database connectivity
ββ Frontend (HTTP 200)
ββ API endpoint (/api/)
6. π Report Status
ββ Success β
or Failure β
docker compose logs -fdocker compose psdocker compose restartdocker compose downdocker compose pull
docker compose up -dcd /home/tesslate/Tesslate-Studio
./scripts/deploy.sh./scripts/health-check.sh./scripts/rollback.sh- URL: http://your-server:3001
- Features:
- View pipeline execution logs
- Monitor build status
- Restart failed builds
- View deployment history
# View all Woodpecker logs
docker compose logs -f
# View only server logs
docker logs -f woodpecker-server
# View only agent logs
docker logs -f woodpecker-agentsudo systemctl status woodpecker
sudo journalctl -u woodpecker -f- Woodpecker uses GitHub OAuth for authentication
- Only users in the TesslateAI organization can access Woodpecker
- Admin user is specified in
WOODPECKER_ADMINenvironment variable
- GitHub webhooks are validated using HMAC signatures
- Woodpecker automatically handles webhook verification
- Never commit
.envfile to git (it's in.gitignore) - Use environment variables for sensitive data
- Agent secret is auto-generated during setup
- Woodpecker agent has Docker socket access (required for deployments)
- Containers run on isolated Docker networks
- Only necessary ports are exposed
Check logs:
docker compose logs -fCheck Tesslate-Studio logs:
cd /home/tesslate/Tesslate-Studio
docker compose -f docker-compose.cloudflare-tunnel.yml logs -fRollback to previous version:
./scripts/rollback.shCheck Docker:
docker ps
docker compose psCheck logs:
docker compose logs woodpecker-server
docker compose logs woodpecker-agentRestart services:
docker compose down
docker compose up -d- Verify GitHub OAuth configuration in
.env - Check that
WOODPECKER_REPOSITORY_FILTERincludes your repository - Ensure you have admin access to the repository on GitHub
- Try logging out and back in to Woodpecker
Run manual health check:
./scripts/health-check.shCheck container status:
cd /home/tesslate/Tesslate-Studio
docker compose -f docker-compose.cloudflare-tunnel.yml psCheck Traefik routing:
curl -H "Host: studio-test.tesslate.com" http://localhost:8080/api/Check orchestrator logs:
docker logs tesslate-orchestratorRun migrations manually:
cd /home/tesslate/Tesslate-Studio
docker compose -f docker-compose.cloudflare-tunnel.yml exec orchestrator alembic upgrade headCheck Alembic version:
docker compose -f docker-compose.cloudflare-tunnel.yml exec orchestrator alembic currentThe pipeline configuration is stored in .woodpecker.yml in the Tesslate-Studio repository.
To modify the pipeline:
- Edit
/path/to/Tesslate-Studio/.woodpecker.yml - Commit and push changes
- Pipeline will automatically update on next run
docker compose downcd /home/tesslate/Tesslate-Studio
./scripts/rollback.shdocker compose down
docker compose up -dFor issues related to:
- Tesslate Studio: Check the main repository
- Woodpecker CI: Check Woodpecker documentation
- This deployment service: Create an issue in this repository
[Your License Here]
Made with β€οΈ for Tesslate Studio