Add self-hosting capabilities and deployment guide for the application
Implement self-hosting for RockyLinux by adding systemd and Nginx configurations, updating API models to support standard OpenAI keys, and providing a comprehensive deployment guide. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 923ae0e3-a363-4db8-b04a-e8baca2a1330 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Event-Id: f8aa455f-f180-4964-94dd-11cfb1a42383 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/8af7d2ec-2cc3-4ece-8af3-9f071488d072/923ae0e3-a363-4db8-b04a-e8baca2a1330/VnHW0bR Replit-Helium-Checkpoint-Created: true
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
[Unit]
|
||||
Description=La Voix du Peuple — API Flask
|
||||
After=network.target postgresql.service
|
||||
Requires=postgresql.service
|
||||
|
||||
[Service]
|
||||
Type=exec
|
||||
User=voixdupeuple
|
||||
Group=voixdupeuple
|
||||
WorkingDirectory=/opt/voix-du-peuple/artifacts/flask-api
|
||||
EnvironmentFile=/opt/voix-du-peuple/.env
|
||||
ExecStart=/opt/voix-du-peuple/.venv/bin/gunicorn \
|
||||
--workers 4 \
|
||||
--bind 127.0.0.1:8000 \
|
||||
--access-logfile /var/log/voix-du-peuple/api-access.log \
|
||||
--error-logfile /var/log/voix-du-peuple/api-error.log \
|
||||
--timeout 60 \
|
||||
app:app
|
||||
Restart=always
|
||||
RestartSec=5
|
||||
|
||||
# Sécurité
|
||||
NoNewPrivileges=true
|
||||
PrivateTmp=true
|
||||
ProtectSystem=strict
|
||||
ReadWritePaths=/var/log/voix-du-peuple
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in New Issue
Block a user