chore: add systemd unit and cloudflare tunnel config
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SfihHazrSHXgndJtSNLubJ
This commit is contained in:
parent
2d146a4e8e
commit
ac569444af
2 changed files with 36 additions and 0 deletions
27
deploy/aitools.service
Normal file
27
deploy/aitools.service
Normal file
|
|
@ -0,0 +1,27 @@
|
||||||
|
[Unit]
|
||||||
|
Description=AiTools (panel prospection IA)
|
||||||
|
After=network-online.target
|
||||||
|
Wants=network-online.target
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Type=simple
|
||||||
|
User=aitools
|
||||||
|
WorkingDirectory=/opt/aitools
|
||||||
|
ExecStart=/usr/bin/node --env-file=/opt/aitools/.env --no-warnings=ExperimentalWarning src/server.js
|
||||||
|
Restart=on-failure
|
||||||
|
RestartSec=5
|
||||||
|
Environment=NODE_ENV=production
|
||||||
|
# Le serveur web reste léger ; Claude Code (enfant) tourne déjà en nice 10
|
||||||
|
Nice=5
|
||||||
|
MemoryMax=900M
|
||||||
|
# Durcissement
|
||||||
|
NoNewPrivileges=true
|
||||||
|
PrivateTmp=true
|
||||||
|
ProtectSystem=strict
|
||||||
|
ProtectHome=read-only
|
||||||
|
ReadWritePaths=/opt/aitools/data -/home/aitools/.claude -/home/aitools/.claude.json
|
||||||
|
ProtectKernelTunables=true
|
||||||
|
ProtectControlGroups=true
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
||||||
9
deploy/cloudflared-config.yml
Normal file
9
deploy/cloudflared-config.yml
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
# /etc/cloudflared/config.yml
|
||||||
|
# Créé avec : cloudflared tunnel create aitools
|
||||||
|
tunnel: aitools
|
||||||
|
credentials-file: /etc/cloudflared/<TUNNEL_ID>.json
|
||||||
|
|
||||||
|
ingress:
|
||||||
|
- hostname: ai.tony-averty.dev
|
||||||
|
service: http://127.0.0.1:3100
|
||||||
|
- service: http_status:404
|
||||||
Loading…
Reference in a new issue