first commit

This commit is contained in:
Mateusz Gruszczyński
2026-04-12 22:34:49 +02:00
parent d4f14832b3
commit d874d015fd
3 changed files with 15 additions and 5 deletions

View File

@@ -3,7 +3,7 @@ ACCESS_TOKEN_EXPIRE_MINUTES=7899999
ALLOW_REGISTRATION=true
DEFAULT_ADMIN_USERNAME=admin
DEFAULT_ADMIN_PASSWORD=admin
APP_PORT=5580
APP_PORT=5581
API_PREFIX=/api
DATA_DIR=/app/storage
DATABASE_URL=sqlite:////app/storage/routeros_backup_next.db

View File

@@ -7,7 +7,7 @@ cp .env.example .env
./start_prod.sh
```
Domyślnie frontend będzie dostępny na:
- `http://127.0.0.1:5580`
- `http://127.0.0.1:5581`
## Migracja starej bazy Flask/SQLite

View File

@@ -3,6 +3,11 @@ upstream backend_upstream {
keepalive 16;
}
map $uri $static_file {
~*\.(?:css|js|mjs|png|jpg|jpeg|gif|svg|ico|webp|woff2?)$ 1;
default 0;
}
server {
listen 80;
server_name _;
@@ -46,8 +51,7 @@ server {
}
location = /index.html {
expires -1;
add_header Cache-Control "no-store, no-cache, must-revalidate" always;
add_header Cache-Control "no-store, no-cache" always;
try_files $uri =404;
}
@@ -73,6 +77,12 @@ server {
}
location / {
try_files $uri $uri/ /index.html;
proxy_pass http://web:80/;
if ($static_file) {
add_header Cache-Control "public, max-age=31536000, immutable" always;
}
add_header Cache-Control "no-store, no-cache" always;
}
}