Skip to content

feat(infra): add Railway staging deployment automation (FRO-61)#33

Merged
pierrick-fonquerne merged 2 commits intodevelopfrom
FRO-61-deploy-staging
Jan 19, 2026
Merged

feat(infra): add Railway staging deployment automation (FRO-61)#33
pierrick-fonquerne merged 2 commits intodevelopfrom
FRO-61-deploy-staging

Conversation

@pierrick-fonquerne
Copy link
Copy Markdown
Owner

@pierrick-fonquerne pierrick-fonquerne commented Jan 16, 2026

🎯 Résumé

Configuration de l'infrastructure de déploiement pour l'environnement de recette (staging) sur Railway.

Cette PR introduit une configuration minimaliste et efficace pour déployer automatiquement le backend .NET sur Railway à partir de la branche develop.

📋 Changements

Infrastructure Railway

  • nixpacks.toml: Configuration de build pour .NET 8 sur Railway
    • Build avec dotnet publish en mode Release
    • Configuration ASPNETCORE_URLS pour bind sur $PORT
    • Invariant globalization pour optimiser la taille

Base de données

  • 000_migration_history.sql: Table de tracking des migrations
    • Permet de tracer quelles migrations ont été appliquées
    • Inclut checksum et temps d'exécution pour chaque migration

🚀 Déploiement

Configuration Railway (déjà effectuée)

  • ✅ Projet Railway lié
  • ✅ Service PostgreSQL ajouté
  • ✅ Service backend fantasyrealm-api créé
  • ✅ Variables d'environnement configurées

Prochaines étapes (post-merge)

  1. Railway déploiera automatiquement depuis develop
  2. Appliquer manuellement les 3 migrations SQL sur la base PostgreSQL Railway :
    • 000_migration_history.sql
    • 001_create_tables.sql
    • 002_add_user_audit_columns.sql

✅ Checklist

  • Configuration Railway testée localement (Docker PostgreSQL)
  • Migrations SQL validées (7 tables, 25 indexes créés)
  • Build .NET configuré dans nixpacks.toml
  • Variables d'environnement Railway configurées
  • Documentation inutile supprimée (approche simple)
  • Scripts de test supprimés (déploiement manuel)

📝 Tickets Jira

  • FRO-61: Déploiement infrastructure recette (Railway + MongoDB Atlas)

Infrastructure complète pour le déploiement automatique sur Railway :

Database:
- Migration tracking table (000_migration_history.sql)
- Système de versioning avec checksum

Scripts:
- migrate-database.sh : Application automatique des migrations SQL
- setup-railway-staging.sh : Guide interactif de setup Railway
- test-migrations-local.sh : Tests locaux des migrations
- test-migrations-windows.ps1 : Version Windows PowerShell
- clean-test-db.sh : Nettoyage de la base de test
- dump-schema.sh : Export du schéma pour comparaison

Railway:
- nixpacks.toml : Configuration build .NET
- railway.staging.json : Configuration service staging

GitHub Actions:
- deploy-staging.yml : Workflow de déploiement automatique
  * CI checks
  * Deploy backend to Railway
  * Run SQL migrations
  * Deployment summary

Documentation:
- railway-staging-setup.md : Guide complet de setup
- quick-start.md : Guide rapide 15 min
- testing-migrations.md : Guide de test des migrations

Architecture:
Push develop → CI → Railway Deploy → SQL Migrations → Staging prêt

via Happy (https://happy.engineering)
@vercel
Copy link
Copy Markdown

vercel bot commented Jan 16, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
fantasyrealm-character-manager Ready Ready Preview, Comment Jan 19, 2026 9:51am

@railway-app
Copy link
Copy Markdown

railway-app bot commented Jan 16, 2026

🚅 Deployed to the fantasyrealm-character-man-pr-33 environment in FantasyRealm Online

Service Status Web Updated (UTC)
fantasyrealm-api ✅ Success (View Logs) Jan 19, 2026 at 9:51 am

@railway-app railway-app bot temporarily deployed to FantasyRealm Online / fantasyrealm-character-man-pr-33 January 16, 2026 14:59 Destroyed
Nettoyage de l'infrastructure pour garder uniquement l'essentiel :

Conservé :
- nixpacks.toml : Configuration build .NET pour Railway
- 000_migration_history.sql : Table de tracking des migrations

Supprimé :
- Documentation complète (non demandée par l'énoncé)
- Scripts de test locaux (utiles en dev mais pas pour le déploiement)
- GitHub Actions workflow (Railway gère le déploiement directement)
- Configs optionnelles

Approche simplifiée : Railway déploie automatiquement depuis GitHub,
migrations appliquées manuellement une fois.

via Happy (https://happy.engineering)
@railway-app railway-app bot temporarily deployed to FantasyRealm Online / fantasyrealm-character-man-pr-33 January 19, 2026 09:50 Destroyed
@pierrick-fonquerne pierrick-fonquerne merged commit 07b418b into develop Jan 19, 2026
7 checks passed
@pierrick-fonquerne pierrick-fonquerne deleted the FRO-61-deploy-staging branch January 19, 2026 14:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant