Add Django backend, Next.js frontend, and deploy templates

This commit is contained in:
ogrechko committed 2026-08-27 15:38:31 +00:00
1 parent fc0c991335
commit e9cd22d36f
93 files changed
+7840 -1

No files matched your search

+35
View File
@@ -0,0 +1,35 @@
server {
listen 80;
server_name kkpab26.ru www.kkpab26.ru;
client_max_body_size 20m;
location /static/ {
alias /var/www/kkpab/backend/staticfiles/;
}
location /media/ {
alias /var/www/kkpab/backend/media/;
}
location /admin/ {
proxy_pass http://127.0.0.1:7788;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
location /api/ {
proxy_pass http://127.0.0.1:7788;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
location / {
proxy_pass http://127.0.0.1:3000;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
+14
View File
@@ -0,0 +1,14 @@
[Unit]
Description=KKPAB Django API
After=network.target
[Service]
User=www-data
Group=www-data
WorkingDirectory=/var/www/kkpab/backend
EnvironmentFile=/var/www/kkpab/backend/.env
ExecStart=/var/www/kkpab/backend/.venv/bin/gunicorn config.wsgi:application --bind 127.0.0.1:7788
Restart=always
[Install]
WantedBy=multi-user.target
+14
View File
@@ -0,0 +1,14 @@
[Unit]
Description=KKPAB Next.js frontend
After=network.target
[Service]
User=www-data
Group=www-data
WorkingDirectory=/var/www/kkpab/frontend
EnvironmentFile=/var/www/kkpab/frontend/.env.local
ExecStart=/usr/bin/npm run start
Restart=always
[Install]
WantedBy=multi-user.target