feat: déploiement HTTPS Oracle + URL API configurable + modèles ML versionnés#4
Merged
Conversation
Avant : les fetch JS client (simulateur, statut scraper, alertes) et les liens Swagger pointaient en dur vers http://localhost:5001. Ça marche en dev local mais casse dès qu'on accède au site via une IP publique ou un domaine (le navigateur du visiteur tape SON propre localhost:5001). Fix : source unique de vérité. - bootstrap.php : variable Twig globale api_base_url lue depuis l'env PUBLIC_API_URL (défaut http://localhost:5001 pour le dev). - layout.twig : injecte window.TECHPULSE_API dans le <head>. - simulator/scraper/search : fetch utilise window.TECHPULSE_API. - liens Swagger (nav, footer, palette, hero, dashboard) : api_base_url. En prod, définir PUBLIC_API_URL=https://<api>.duckdns.org dans .env.local suffit pour que toutes les features marchent derrière le domaine + HTTPS. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Le PHP lit PUBLIC_API_URL pour injecter window.TECHPULSE_API. En prod on le surcharge via .env.local (https://<api>.duckdns.org) ; défaut local http://localhost:5001. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Symptôme : sur le déploiement Oracle, simulateur salaire / prédiction / offres similaires renvoyaient "modèle non entraîné". Les .pkl étaient gitignorés → absents du clone, et hatchling ne les bundlait pas. Fix : - dé-gitignore salary_model.pkl + similarity_model.pkl (1.4M + 458K) - pyproject : artifacts + force-include pour bundler les .pkl dans le wheel Ainsi tout déploiement (Oracle, grading prof) a les modèles d'emblée. Re-générables via `make retrain` après un nouveau scrape. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Site déployé sur Oracle Cloud, HTTPS via Caddy + Let's Encrypt : - https://bastagas-techpulse.duckdns.org - https://bastagas-tehcpulse-api.duckdns.org/docs Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Contexte
Mise en ligne publique de TechPulse sur Oracle Cloud avec HTTPS, et corrections nécessaires pour que le site fonctionne derrière un domaine.
Changements
URL d'API configurable (
window.TECHPULSE_API)localhost:5001→ cassaient derrière un domaine.bootstrap.php: variable Twigapi_base_urllue depuisPUBLIC_API_URL.layout.twig: injectewindow.TECHPULSE_API.docker-compose.yml: passePUBLIC_API_URLau conteneur frontend.Modèles ML versionnés
salary_model.pkl+similarity_model.pkldé-gitignorés et commités (1.4M + 458K).pyproject.toml:force-includepour bundler les.pkldans le wheel hatchling.Déploiement live
Test plan
🤖 Generated with Claude Code