ci: docker_tag=ext chore(node): redeploy images ext
This commit is contained in:
parent
dd43fde106
commit
a5b8f1a2db
11
.env.exemple
11
.env.exemple
@ -7,7 +7,7 @@ IDNOT_ANNUARY_BASE_URL=https://qual-api.notaires.fr/annuaire
|
|||||||
# IDNOT_REDIRECT_URI=http://local.4nkweb.com:3004/authorized-client
|
# IDNOT_REDIRECT_URI=http://local.4nkweb.com:3004/authorized-client
|
||||||
IDNOT_REDIRECT_URI=http://local.4nkweb.com:3000/authorized-client
|
IDNOT_REDIRECT_URI=http://local.4nkweb.com:3000/authorized-client
|
||||||
IDNOT_TOKEN_URL=https://qual-connexion.idnot.fr/user/IdPOAuth2/token/idnot_idp_v1
|
IDNOT_TOKEN_URL=https://qual-connexion.idnot.fr/user/IdPOAuth2/token/idnot_idp_v1
|
||||||
IDNOT_API_BASE_URL=https://qual-api.notaires.fr/annuaire
|
IDNOT_API_BASE_URL=https://qual-api.notaires.fr
|
||||||
|
|
||||||
# Configuration serveur
|
# Configuration serveur
|
||||||
APP_HOST=dev4.4nkweb.com
|
APP_HOST=dev4.4nkweb.com
|
||||||
@ -39,14 +39,14 @@ NEXT_PUBLIC_DOCAPOSTE_API_URL=
|
|||||||
NEXT_PUBLIC_API_URL=https://dev4.4nkweb.com/api
|
NEXT_PUBLIC_API_URL=https://dev4.4nkweb.com/api
|
||||||
NEXT_PUBLIC_DEFAULT_VALIDATOR_ID=28c9a3a8151bef545ebf700ca5222c63d0031ad593097e95c1de202464304a99
|
NEXT_PUBLIC_DEFAULT_VALIDATOR_ID=28c9a3a8151bef545ebf700ca5222c63d0031ad593097e95c1de202464304a99
|
||||||
NEXT_PUBLIC_DEFAULT_STORAGE_URLS=https://dev4.4nkweb.com/storage
|
NEXT_PUBLIC_DEFAULT_STORAGE_URLS=https://dev4.4nkweb.com/storage
|
||||||
SIGNER_BASE_URL=https://dev3.4nkweb.com/signer/
|
|
||||||
CORS_ALLOWED_ORIGINS=http://local.4nkweb.com:3000,https://dev4.4nkweb.com
|
|
||||||
|
|
||||||
# WS
|
# WS
|
||||||
# RELAY_URLS=wss://demo.4nkweb.com/ws
|
# RELAY_URLS=wss://demo.4nkweb.com/ws
|
||||||
RELAY_URLS=wss://dev4.4nkweb.com/ws
|
RELAY_URLS=wss://dev4.4nkweb.com/ws
|
||||||
|
|
||||||
# SIGNER_WS_URL=ws://dev4.4nkweb.com/signer/
|
# SIGNER_WS_URL=ws://dev4.4nkweb.com/signer/
|
||||||
SIGNER_WS_URL=ws://dev3.4nkweb.com
|
SIGNER_WS_URL=ws://dev3.4nkweb.com
|
||||||
|
SIGNER_BASE_URL=https://dev3.4nkweb.com
|
||||||
|
|
||||||
|
|
||||||
# IHM URLS
|
# IHM URLS
|
||||||
@ -56,6 +56,8 @@ VITE_BOOTSTRAPURL=https://dev4.4nkweb.com/ws/
|
|||||||
# Cartes de test Stripe
|
# Cartes de test Stripe
|
||||||
SUCCES='4242 4242 4242 4242'
|
SUCCES='4242 4242 4242 4242'
|
||||||
DECLINED='4000 0025 0000 3155'
|
DECLINED='4000 0025 0000 3155'
|
||||||
|
ENABLE_SUBSCRIPTION_STUB=true
|
||||||
|
CORS_ALLOWED_ORIGINS=http://local.4nkweb.com:3000,https://dev4.4nkweb.com
|
||||||
|
|
||||||
# ================================= /!\ sensible ========================
|
# ================================= /!\ sensible ========================
|
||||||
|
|
||||||
@ -86,4 +88,5 @@ STRIPE_STANDARD_ANNUAL_SUBSCRIPTION_PRICE_ID=
|
|||||||
STRIPE_UNLIMITED_SUBSCRIPTION_PRICE_ID=
|
STRIPE_UNLIMITED_SUBSCRIPTION_PRICE_ID=
|
||||||
STRIPE_UNLIMITED_ANNUAL_SUBSCRIPTION_PRICE_ID=
|
STRIPE_UNLIMITED_ANNUAL_SUBSCRIPTION_PRICE_ID=
|
||||||
|
|
||||||
SIGNER_API_KEY=your-api-key-change-this
|
SIGNER_API_KEY=your-api-key-change-this
|
||||||
|
VITE_JWT_SECRET_KEY=52b3d77617bb00982dfee15b08effd52cfe5b2e69b2f61cc4848cfe1e98c0bc9
|
@ -3,6 +3,9 @@ server {
|
|||||||
listen 80;
|
listen 80;
|
||||||
server_name dev4.4nkweb.com;
|
server_name dev4.4nkweb.com;
|
||||||
|
|
||||||
|
# Forcer l'upgrade des requêtes HTTP en HTTPS pour éviter les contenus mixtes
|
||||||
|
add_header Content-Security-Policy "upgrade-insecure-requests" always;
|
||||||
|
|
||||||
# ACME HTTP-01 challenges
|
# ACME HTTP-01 challenges
|
||||||
location /.well-known/acme-challenge/ {
|
location /.well-known/acme-challenge/ {
|
||||||
root /var/www/letsencrypt;
|
root /var/www/letsencrypt;
|
||||||
|
@ -52,7 +52,7 @@ services:
|
|||||||
ports:
|
ports:
|
||||||
- "127.0.0.1:8000:8000"
|
- "127.0.0.1:8000:8000"
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD-SHELL", "code=$(curl -s -o /dev/null -w '%{http_code}' http://localhost:8000/tweaks/1); [ \"$code\" != \"000\" ]"]
|
test: ["CMD-SHELL", "code=$(curl -s -o /dev/null -w '%{http_code}' http://localhost:8000/tweaks/1); [ \"$$code\" != \"000\" ]"]
|
||||||
interval: 15s
|
interval: 15s
|
||||||
timeout: 5s
|
timeout: 5s
|
||||||
retries: 10
|
retries: 10
|
||||||
|
@ -25,3 +25,43 @@ Analyse synthétique de l’orchestrateur `lecoffre_node` (Docker Compose + Ngin
|
|||||||
- **Tags d’images**: homogénéiser (`latest`, `dev`, `ext`) selon politique CI
|
- **Tags d’images**: homogénéiser (`latest`, `dev`, `ext`) selon politique CI
|
||||||
- **Exposition locale**: vérif des binds `127.0.0.1` vs `127.0.0.2`
|
- **Exposition locale**: vérif des binds `127.0.0.1` vs `127.0.0.2`
|
||||||
- **Watchtower**: intervalle 30s, labels présents sur services applicatifs
|
- **Watchtower**: intervalle 30s, labels présents sur services applicatifs
|
||||||
|
|
||||||
|
### Topologie Docker Compose (détails)
|
||||||
|
- **tor**: `btcpayserver/tor:0.4.8.10` (alias `tor` sur `btcnet`)
|
||||||
|
- **bitcoin**: `git.4nkweb.com/4nk/bitcoin:latest`, volume `4nk_node_bitcoin_data`, healthcheck `bitcoin-cli getblockchaininfo`
|
||||||
|
- **blindbit**: `git.4nkweb.com/4nk/blindbit-oracle:dev`, ports `127.0.0.1:8000:8000`, healthcheck HTTP, dépend de `bitcoin`
|
||||||
|
- **sdk_relay**: `git.4nkweb.com/4nk/sdk_relay:dev`, ports `127.0.0.1:8090:8090`, logs dans `/home/bitcoin/.4nk/logs/sdk_relay.log`, healthcheck `/health`
|
||||||
|
- **sdk_signer**: `git.4nkweb.com/4nk/sdk_signer:latest`, ports `127.0.0.1:3001:3001`
|
||||||
|
- **sdk_storage**: `git.4nkweb.com/4nk/sdk_storage:latest`, ports `127.0.0.1:8081:8081`
|
||||||
|
- **lecoffre-back**: `git.4nkweb.com/4nk/lecoffre-back-mini:ext`, ports `127.0.0.1:8080:8080`
|
||||||
|
- **lecoffre-front**: `git.4nkweb.com/4nk/lecoffre-front:ext`, ports `127.0.0.2:3004:3000`
|
||||||
|
- **ihm_client**: `git.4nkweb.com/4nk/ihm_client:ext`, ports `127.0.0.1:3003:3003`
|
||||||
|
- **watchtower**: `containrrr/watchtower`, `--interval 30 --label-enable`
|
||||||
|
|
||||||
|
### Réseau et volumes
|
||||||
|
- **Réseau**: `btcnet` (bridge) IPAM `172.20.0.0/16`, alias par service (bitcoin, blindbit, sdk_relay, etc.)
|
||||||
|
- **Volumes**: `4nk_node_bitcoin_data`, `blindbit_data`, `sdk_data`
|
||||||
|
|
||||||
|
### Nginx dev4.4nkweb.com (résumé configuration)
|
||||||
|
- `/api/` → `http://127.0.0.1:8080/api/` avec CORS dynamique (origines autorisées: `http://local.4nkweb.com:3000`, `https://dev4.4nkweb.com`)
|
||||||
|
- `/back/(.*)` → `http://127.0.0.1:8080/api/$1`
|
||||||
|
- `/apiv1/(.*)` → réécrit vers `/api/v1/$1`
|
||||||
|
- `/` → `http://127.0.0.1:3003` (ihm_client)
|
||||||
|
- `/lecoffre` et `/lecoffre/` → `http://127.0.0.2:3004/lecoffre/` (basePath Next.js)
|
||||||
|
- `/_next/` → `http://127.0.0.2:3004/_next/`
|
||||||
|
- `/blindbit/` → `http://127.0.0.1:8000/`
|
||||||
|
- `/signer/` (WebSocket) → `http://127.0.0.1:3001/` avec `Upgrade/Connection` adaptés
|
||||||
|
|
||||||
|
### Ordre de démarrage recommandé
|
||||||
|
- Recommandé: `tor` → `bitcoin` → `blindbit` → `sdk_storage` → `sdk_relay` → `sdk_signer` → `ihm_client` → `lecoffre-back` → `lecoffre-front`
|
||||||
|
- Écart observé: Compose démarre `sdk_relay` avant `sdk_storage`. À harmoniser si dépendances runtime avérées.
|
||||||
|
|
||||||
|
### Variables .env clefs (rappels)
|
||||||
|
- Front: `NEXT_PUBLIC_*` (host/port/API/basePath/Idnot/Docaposte/4NK)
|
||||||
|
- Back: `PORT`, `DEFAULT_STORAGE`, `APP_HOST`, `STRIPE_*`, `IDNOT_*`, `CORS_ALLOWED_ORIGINS`
|
||||||
|
|
||||||
|
### Risques et recommandations
|
||||||
|
- Uniformiser les tags d’images (`docker-support-v2` si applicable) et éviter `latest` en prod
|
||||||
|
- Vérifier l’alignement `basePath` Next `/lecoffre` ↔ proxys Nginx (routes et assets)
|
||||||
|
- Geler les origines CORS en prod et journaliser les refus
|
||||||
|
- Surveiller la santé `blindbit` et `sdk_relay` (healthchecks ↔ restart policy)
|
||||||
|
28
tests/analyse.md
Normal file
28
tests/analyse.md
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
## Axes de tests — lecoffre_node
|
||||||
|
|
||||||
|
### Pré-requis
|
||||||
|
- Nginx rechargé et conf active (`dev4.4nkweb.com.conf`)
|
||||||
|
- Réseau Docker `4nk_node_btcnet` présent
|
||||||
|
- Volumes montés (`4nk_node_bitcoin_data`, `blindbit_data`, `sdk_data`)
|
||||||
|
|
||||||
|
### Démarrage et dépendances
|
||||||
|
- Ordre de démarrage observé vs recommandé (voir docs/analyse.md)
|
||||||
|
- Healthchecks: `bitcoin` (CLI), `blindbit` (HTTP), `sdk_relay` (`/health`)
|
||||||
|
|
||||||
|
### Routage Nginx
|
||||||
|
- `/back/*` et `/api/*` → backend 8080 (statuts 200, pas de HTML)
|
||||||
|
- `/lecoffre/` et `/_next/` → front 3004 avec basePath OK
|
||||||
|
- `/signer/` WebSocket (101), `/blindbit/` (200)
|
||||||
|
|
||||||
|
### CORS
|
||||||
|
- Origines autorisées: `http://local.4nkweb.com:3000`, `https://dev4.4nkweb.com`
|
||||||
|
- Prévols `OPTIONS` (204) et en-têtes `Access-Control-*`
|
||||||
|
|
||||||
|
### Non-régression
|
||||||
|
- Absence de `localhost:8080` dans les bundles front servis via `/lecoffre/`
|
||||||
|
- Redirections locales `local.4nkweb.com:3000` → `https://dev4.4nkweb.com/lecoffre/`
|
||||||
|
|
||||||
|
### Observabilité
|
||||||
|
- Journaux Nginx (`error.log`) sans erreurs après reload
|
||||||
|
- Logs `sdk_relay` présents dans `/home/bitcoin/.4nk/logs/sdk_relay.log`
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user