Some checks failed
CI / test-and-build (push) Failing after 25s
Co-authored-by: Cursor <cursoragent@cursor.com>
2.1 KiB
2.1 KiB
Gitea + CI/CD + tloto-deploy (nouveau VPS)
URLs
| Service | URL |
|---|---|
| Gitea (temporaire IP) | http://191.215.41.53:3000/ |
| Gitea (après DNS) | https://git.tloto.net/ |
| Registry local | 127.0.0.1:5000 (non public) |
| Tloto HTTP smoke | http://191.215.41.53:9080/ |
Credentials admin Gitea : ~/gitea-admin-credentials.txt sur le VPS.
Architecture
- Gitea : dépôt central + Actions.
- act_runner : CI (build/tests/images) — ne déploie pas la prod directement.
tloto-deploy: seul mécanisme prod (manuel SSH ou workflowDeployvia clé SSH restreinte).- Commandes historiques inchangées :
sudo npm run db:migrate,sudo npm run phase-b:up:https.
Déploiement manuel (SSH)
ssh deploy@191.215.41.53
tloto-deploy --ref main --mode http
# après cutover HTTPS :
tloto-deploy --ref <sha> --mode https
tloto-deploy --rollback
Déploiement manuel (Gitea UI)
- Repo → Actions → workflow Deploy → Run workflow.
- Renseigner
ref(SHA/branche) etmode. - Secrets requis :
DEPLOY_SSH_KEY(privé~/gitea-deploy-ssh/id_ed25519),DEPLOY_SSH_HOST(ex.172.16.0.1).
CI (automatique)
Push/PR sur main / master / develop → workflow CI :
npm ci+ compile backend- Build images Docker
- Push vers registry local
127.0.0.1:5000/tloto-*:<sha12> - Pas de mise en prod
pgAdmin (Windows)
Voir ~/pgadmin-db-credentials.txt sur le VPS. Tunnel SSH uniquement — jamais exposer 5432.
ssh -N -L 5433:127.0.0.1:5432 deploy@191.215.41.53
Rollback
- Application :
tloto-deploy --rollback(réactive leprev_sha). - PostgreSQL : pas de rollback automatique ; dumps dans
/var/lib/tloto/backups/avant migrate sischema.sqla changé.
Edge HTTPS git.tloto.net
Quand le DNS A de git.tloto.net pointe vers le VPS :
cd ~/edge
# placer fullchain.pem + privkey.pem dans certs/ puis décommenter le bloc 443 dans nginx.conf
sudo docker compose --profile edge up -d
# Mettre à jour ~/gitea/.env : GITEA_ROOT_URL=https://git.tloto.net/
sudo docker compose -f ~/gitea/docker-compose.yml up -d gitea