Snazzle Production Server v3 #90
redstone-dev
announced in
Announcements
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
SPS v3: Now with 104% less bugs!
v3 has no major changes from v2. It should fix some installation problems though. v4 will come out Soon(TM) which will make SPS into a branch of
mainand make it easier to run in a Docker container while still supportingsystemdfor running on bare metal. v5 will add support for macOS'launchdto allow running SPS in the background on that platform.Information
A quick-and-dirty hack I did to create a version of Snazzle that can be used in prod. It's basically just Snazzle bundled with and tweaked to use bjoern as a WSGI server. It's also got a tool bundled with it to manage the server via the command line.
The file
Snazzle-Prod-Posix-v3.tar.gzcontains the source code for it. Windows version is coming Soon(TM). Does not follow SemVer. The version number just increments by one for each release.bjoern is so fast that any performance issues are probably our or your computer's fault.
Installation
Once downloading and decompressing the
Snazzle-Prod-Posix-v3.tar.gzfile, you need to install an additional library calledlibevwhich has to be done via the terminal using one of the following commands:After that, change the value of
SNAZZLE_PATHin the.envfile to the absolute path of where your installation is.Then you can do
python3 app.pyto run the server normally, as the compressed file has all the deps installed already. (Whoops.)Running SPS as a
systemdserviceOn Linux, you can use
systemdto have software run constantly in the background. I had to tweak a lot of things to get it to work properly, which is why this took all morning for me to create.Eventually you'll be able to do something similar on macOS, but that uses
launchdinstead ofsystemdwhich I haven't looked into yet.To do this with SPS, once unzipped, run:
which will create a systemd user service called
snazzlethat is started after running this command.To run this at all times when your server is on, add the
-xflag tocreate-service. To disable this behaviour:You might want to add this to your PATH or add an alias to it in your
.bashrc(I did this and called itsnazzle).Other useful server-util sub-commands (prefix these with
server-util.shor your alias):This discussion was created from the release Snazzle Production Server v3.
Beta Was this translation helpful? Give feedback.
All reactions