Update UI and migrations, fix dockerfile

This commit is contained in:
Your Name
2026-07-18 21:29:05 +05:00
parent 580c75cbf6
commit 26ef145ccf
95 changed files with 9541 additions and 111 deletions
+23
View File
@@ -0,0 +1,23 @@
[Unit]
Description=Forma N8 public website
After=network.target postgresql.service
Wants=postgresql.service
[Service]
Type=simple
User=forma-n8
Group=forma-n8
WorkingDirectory=/opt/forma-n8
EnvironmentFile=/etc/forma-n8.env
Environment=PYTHONPATH=/opt/forma-n8/src
ExecStart=/opt/forma-n8/.venv/bin/uvicorn forma_n8_site.app:app --host 127.0.0.1 --port 8090 --proxy-headers
Restart=always
RestartSec=3
NoNewPrivileges=true
PrivateTmp=true
ProtectSystem=strict
ProtectHome=true
ReadWritePaths=/var/lib/forma-n8
[Install]
WantedBy=multi-user.target
+31
View File
@@ -0,0 +1,31 @@
server {
listen 80 default_server;
listen [::]:80 default_server;
server_name _;
client_max_body_size 52m;
location /static/ {
alias /opt/forma-n8/static/;
expires 30d;
add_header Cache-Control "public, immutable";
access_log off;
}
location /media/ {
alias /var/lib/forma-n8/uploads/;
expires 30d;
add_header Cache-Control "public";
add_header X-Content-Type-Options "nosniff";
}
location / {
proxy_pass http://127.0.0.1:8090;
proxy_http_version 1.1;
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_read_timeout 60s;
}
}