Skip to content

Commit

Permalink
Serve staticfile direct from nginx unit
Browse files Browse the repository at this point in the history
We don't need to use django for staticfiles (even if there is a CDN
in front)
  • Loading branch information
frankh committed Mar 8, 2024
1 parent 6d1eb0f commit 5811e3a
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion unit.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
},
"listeners": {
"*:8000": {
"pass": "applications/posthog"
"pass": "routes/app"
},
"*:8001": {
"pass": "routes/metrics"
Expand All @@ -16,6 +16,21 @@
}
},
"routes": {
"app": [
{
"match": {
"uri": ["/static/*"]
},
"action": {
"share": ["/code/staticfiles", "/code/frontend/dist", "/code/posthog/year_in_posthog/images"]
}
},
{
"action": {
"pass": "applications/posthog"
}
}
],
"metrics": [
{
"match": {
Expand Down

0 comments on commit 5811e3a

Please sign in to comment.