Tiny C webserver with resource adaption features.
To execute grocery you need:
- A Linux kernel
- GLibC or similar (muslc is fine, for Void/Alpine users)
- The ImageMagick suite
If you want compile grocery from its source code, you only need make and gcc. Of course if you want to build a grocery container from scratch you need Docker.
It's dead simple. You just need to run the container mounting a directory as the www volume. Let's say you have a files folder in your current working directory:
$ sudo docker run -d -P -p 8080:8080 -v $(pwd)/files:/grocery/www dottorblaster/groceryAll you need is in Makefile. After building the test image with make build_docker_test, you can run that with make docker_test. Then, you can restart the container to reflect code changes as the image rebuilds the whole application as the entry point.
If you got all your dependencies ready, just build the webserver and run it:
$ make
$ ./grocery 8080 Grocery will be listening on localhost:8080.
You need:
- A
wwwdirectory in your cwd as grocery will attempt to read files from that - An empty
cachedirectory in the cwd, as grocery will use it as a persistency layer for the caching logic.