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 Apr 4, 2024
1 parent 93dd58f commit 7da2743
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/posthog"
},
"*:8001": {
"pass": "routes/metrics"
Expand All @@ -16,6 +16,21 @@
}
},
"routes": {
"posthog": [
{
"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 7da2743

Please sign in to comment.