This commit is contained in:
Iliyan Angelov
2025-12-10 01:36:00 +02:00
parent 2f6dca736a
commit 6a9e823402
84 changed files with 5293 additions and 1836 deletions

View File

@@ -0,0 +1,27 @@
[Unit]
Description=GNX-WEB Django Backend (Gunicorn)
After=network.target postgresql.service
Requires=postgresql.service
[Service]
Type=notify
User=gnx
Group=gnx
WorkingDirectory=/home/gnx/Desktop/GNX-WEB/backEnd
Environment="PATH=/home/gnx/Desktop/GNX-WEB/backEnd/venv/bin"
EnvironmentFile=/home/gnx/Desktop/GNX-WEB/backEnd/.env
ExecStart=/home/gnx/Desktop/GNX-WEB/backEnd/venv/bin/gunicorn \
--bind 127.0.0.1:1086 \
--workers 3 \
--timeout 120 \
--access-logfile /home/gnx/Desktop/GNX-WEB/backEnd/logs/gunicorn_access.log \
--error-logfile /home/gnx/Desktop/GNX-WEB/backEnd/logs/gunicorn_error.log \
--log-level info \
gnx.wsgi:application
ExecReload=/bin/kill -s HUP $MAINPID
Restart=always
RestartSec=10
[Install]
WantedBy=multi-user.target

View File

@@ -0,0 +1,22 @@
[Unit]
Description=GNX-WEB Next.js Frontend
After=network.target
[Service]
Type=simple
User=gnx
Group=gnx
WorkingDirectory=/home/gnx/Desktop/GNX-WEB/frontEnd
Environment="NODE_ENV=production"
Environment="PORT=1087"
Environment="NEXT_TELEMETRY_DISABLED=1"
EnvironmentFile=/home/gnx/Desktop/GNX-WEB/frontEnd/.env.production
ExecStart=/usr/bin/npm start
Restart=always
RestartSec=10
StandardOutput=journal
StandardError=journal
[Install]
WantedBy=multi-user.target