71 lines
1.2 KiB
Plaintext
71 lines
1.2 KiB
Plaintext
@startuml deployment-architecture
|
|
skinparam backgroundColor white
|
|
|
|
title SmartTools Deployment Architecture
|
|
|
|
node "Production Server" {
|
|
package "Application" {
|
|
[Flask App Port 5050] as Flask
|
|
[Gunicorn WSGI] as Gunicorn
|
|
}
|
|
|
|
package "Process Management" {
|
|
[systemd Service] as Systemd
|
|
}
|
|
|
|
database "SQLite Database" as DB
|
|
|
|
folder "Static Files" {
|
|
[CSS/JS/Images] as Static
|
|
}
|
|
}
|
|
|
|
node "Reverse Proxy" {
|
|
[nginx] as Nginx
|
|
}
|
|
|
|
cloud "Internet" {
|
|
actor "Users" as Users
|
|
[Sentry.io] as Sentry
|
|
}
|
|
|
|
node "Development" {
|
|
[Flask Dev Server] as DevFlask
|
|
database "Dev SQLite" as DevDB
|
|
}
|
|
|
|
Users --> Nginx : HTTPS 443
|
|
Nginx --> Gunicorn : HTTP 5050
|
|
Gunicorn --> Flask
|
|
Flask --> DB
|
|
Flask --> Static
|
|
Systemd --> Gunicorn : manages
|
|
Flask ..> Sentry : error reports
|
|
|
|
Users --> DevFlask : HTTP 5050
|
|
DevFlask --> DevDB
|
|
|
|
note right of Flask
|
|
Environment Variables:
|
|
FLASK_ENV=production
|
|
SECRET_KEY=<secret>
|
|
SENTRY_DSN=<dsn>
|
|
SITE_URL=https://...
|
|
end note
|
|
|
|
note right of Systemd
|
|
/etc/systemd/system/
|
|
smarttools-web.service
|
|
|
|
gunicorn -w 4
|
|
-b 0.0.0.0:5050
|
|
end note
|
|
|
|
note bottom of Nginx
|
|
SSL termination
|
|
Proxy to localhost:5050
|
|
Static file caching
|
|
end note
|
|
|
|
@enduml
|