diff options
| author | Emil Williams | 2025-07-06 18:36:26 +0000 |
|---|---|---|
| committer | Emil Williams | 2025-07-06 18:36:26 +0000 |
| commit | a9c95145e8b3d9a46a4597e4c4c5d4ac77ad18db (patch) | |
| tree | f2854e0b06f1222bd88c5268f2849b01abc52b69 /README.md | |
| parent | be96ef3c69aa497dd0a663de6cc3318fa7d77893 (diff) | |
| download | emil-up.chud.cyou-a9c95145e8b3d9a46a4597e4c4c5d4ac77ad18db.tar.xz emil-up.chud.cyou-a9c95145e8b3d9a46a4597e4c4c5d4ac77ad18db.tar.zst | |
nginx, in deployment
Diffstat (limited to 'README.md')
| -rw-r--r-- | README.md | 64 |
1 files changed, 7 insertions, 57 deletions
@@ -1,61 +1,11 @@ -# Upchud -> File upload service; without stage 4 retardation. +Sane deployment of [anon's upchud](https://git.xolatile.top/anon/upchud) for nginx. -### Shilling points 🚀: -* Minimal dependencies -* CLI friendly -* Web friendly -* Optional random upload name mangling -* Easy to configure -* Small codebase -* Traubisoda +Things that need to change for deployment are the up.chud.cyou nginx file and crontab. -### Depedencies -* Lighttpd -* Tcl (base installation) - -### Files -| File | Description | -| :------------ | :---------- | -| lighttpd.conf | Master lighttpd configuration. Tip: set max upload size here. | -| upchud.tcl | Master CGI Tcl script. Tip: simply forked by lighttpd; set finer configurations here. | -| Makefile | Short-hands for common operations. | -| test/* | Scripts and files used during development. | -| example\_frontend.html | Simple web front-end for the service. | -| example\_frontend.lighttpd.conf | Serves the example front-end. Tip: you could merge this with the master configuration if you wanted one service. | - -### Usage -Lets get hello-world out-of the way: -```sh -$ make serve & -[1] 15225 -lighttpd -D -f lighttpd.conf -$ curl http://localhost:8080 --upload-file test/test.txt -http://localhost:8080/out//n6cru4.txt -$ curl http://localhost:8080/out//n6cru4.txt -Hello World -``` - -Alternatively I could run. -```sh -$ make serve & -[1] 23895 -lighttpd -D -f lighttpd.conf -$ make front & -[2] 24105 -lighttpd -D -f example_frontend.lighttpd.conf +The nginx & crontab files expect: +```tcl +set outdir "out/" +set keep_outdir 0 ``` -And I could use the web page (localhost:8081 by default) to perform the same task. - -The example frontend is perfectly functional, but is meant to be modified. -Alternatively, you could copy and embed it anywhere else on your site at large. - -To learn more about configuration, read the top of `upchud.tcl` and checkout `lighttpd.conf` -### Why? -Because every implementation of this extremely simple thing is flawed. -Common faults I witnessed are: -* CLI is second class with sloppy wrapper scripts and or HTML responses -* No web support, preventing phoneposting -* Horrifically convoluted configuration due to poor isolation of responsibilities -* 6 gorillion dependencies +keep_outdir is a patched in feature. |
