Date : 10-12-2025 Statut : EN COURS - SSH à configurer par l'utilisateur
| Info | Valeur |
|---|---|
| IP | 192.168.1.104 |
| User SSH | gouroubleu |
| Hostname | (à configurer - optionnel) |
| Wildcard SSL | Déjà configuré (Let's Encrypt) |
| Info | Valeur |
|---|---|
| Provider | o2switch |
| cPanel URL | https://yellow.o2switch.net:2083 |
| API | UAPI cPanel |
| Auth | cpanel USERNAME:APITOKEN |
name: "hellocar"
services:
api:
type: "bun"
port: 4510
nginx:
domain: "hellocar-api-prod.33800.nowhere84.com"
proxy_pass: "http://192.168.1.11:4510"
ssl: true
headers:
- "X-Real-IP $remote_addr"
- "X-Forwarded-For $proxy_add_x_forwarded_for"
public:
type: "qwik"
port: 4501
nginx:
domain: "hellocar-public-prod.33800.nowhere84.com"
proxy_pass: "http://192.168.1.11:4501"
ssl: true
cache:
enabled: true
paths: ["/assets", "/_build"]
duration: "30d"
admin:
type: "qwik"
port: 4500
nginx:
domain: "hellocar-admin-prod.33800.nowhere84.com"
proxy_pass: "http://192.168.1.11:4500"
ssl: true
# Méthode 1 : Header Authorization
curl -H "Authorization: cpanel USERNAME:APITOKEN" \
"https://yellow.o2switch.net:2083/execute/..."
# Méthode 2 : Basic Auth (alternative)
curl -u "USERNAME:APITOKEN" \
"https://yellow.o2switch.net:2083/execute/..."
curl -H "Authorization: cpanel USERNAME:APITOKEN" \
"https://yellow.o2switch.net:2083/execute/ZoneEdit/fetch_zone_records?domain=nowhere84.com"
curl -H "Authorization: cpanel USERNAME:APITOKEN" \
"https://yellow.o2switch.net:2083/execute/ZoneEdit/add_zone_record?domain=nowhere84.com&name=*.33800&type=A&address=IP_PUBLIQUE_NGINX&ttl=3600"
curl -H "Authorization: cpanel USERNAME:APITOKEN" \
"https://yellow.o2switch.net:2083/execute/ZoneEdit/edit_zone_record?domain=nowhere84.com&line=LINE_NUMBER&name=*.33800&type=A&address=NEW_IP&ttl=3600"
curl -H "Authorization: cpanel USERNAME:APITOKEN" \
"https://yellow.o2switch.net:2083/execute/ZoneEdit/remove_zone_record?domain=nowhere84.com&line=LINE_NUMBER"
Dans /mnt/stock_36to/data/docker/secrets/ :
prod.env et dev.env :
# o2switch cPanel API
O2SWITCH_USERNAME=ton_username_cpanel
O2SWITCH_APITOKEN=ton_api_token
O2SWITCH_DOMAIN=nowhere84.com
# Auto-generated by gouroubleu deploy system
# Project: hellocar | Service: api | Env: prod
# Generated: 2025-12-10
server {
listen 80;
server_name hellocar-api-prod.33800.nowhere84.com;
return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl http2;
server_name hellocar-api-prod.33800.nowhere84.com;
# SSL Wildcard Let's Encrypt
ssl_certificate /etc/letsencrypt/live/33800.nowhere84.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/33800.nowhere84.com/privkey.pem;
# SSL Settings
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256;
ssl_prefer_server_ciphers off;
location / {
proxy_pass http://192.168.1.11:4510;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_cache_bypass $http_upgrade;
}
}
┌─────────────────────────────────────────────────────────────┐
│ "mets en prod hellocar" │
├─────────────────────────────────────────────────────────────┤
│ 1. Clone GitHub (branche main) │
│ 2. Build & Deploy Docker sur 192.168.1.11 │
│ 3. Lecture section nginx: du conf.gouroubleu.yml │
│ 4. Génération fichier .conf Nginx │
│ 5. SSH vers 192.168.1.104 (gouroubleu) │
│ 6. Vérification conflits : │
│ - diff ancien/nouveau fichier │
│ - grep domain dans autres configs │
│ 7. Copie /etc/nginx/sites-available/{projet}-{svc}-{env} │
│ 8. ln -sf vers sites-enabled/ │
│ 9. sudo nginx -t │
│ 10. sudo systemctl reload nginx │
│ 11. Curl test https://domain → 200 OK ? │
├─────────────────────────────────────────────────────────────┤
│ DNS (si nouveau sous-domaine hors wildcard) │
│ → Appel API o2switch pour vérifier/créer │
└─────────────────────────────────────────────────────────────┘
sudo apt install openssh-server -y && sudo systemctl enable sshsudo hostnamectl set-hostname nginx-proxy/etc/letsencrypt/live/33800.nowhere84.com/ ou autre ?Dis-moi quand SSH est prêt sur 192.168.1.104 !