|
||
---|---|---|
apps | ||
data/static | ||
lib | ||
sass | ||
secrets | ||
svg-icons | ||
views | ||
.dockerignore | ||
.gitignore | ||
app.lua | ||
config.lua | ||
constants.lua | ||
create_default_accounts.lua | ||
docker-compose.yml | ||
Dockerfile | ||
LICENSE.md | ||
migrations.lua | ||
mime.types | ||
models.lua | ||
nginx.conf | ||
porom-dev-1.rockspec | ||
README.md | ||
schema.lua | ||
start.sh | ||
util.lua |
Porom
porous forum
License
Released under CNPLv7+. Please read the full terms for proper wording.
installing & first time setup
- first, install OpenResty. instructions for linux can be found here.
- then, install LuaJIT and Lua 5.1 (usually called
lua5.1
in package managers) - then, install LuaRocks (prefer your package manager instead of a local install recommended by the guide)
- add luarocks search dirs to path:
# in .bashrc (or other shell equivalent)
eval "$(luarocks --lua-version 5.1 path)"
- clone repo
- install the dependencies:
$ luarocks --local --lua-version 5.1 build --only-deps
- create a file named
secrets.lua
in the project directory.
use thesecrets.lua.example
file as reference, and generate a cryptographically secure random key, for example, with:
$ openssl rand -hex 32
- run:
$ start.sh production
the script will perform some necessary first time setup (and create a hidden file in the folder to ensure it won't do so again). it will create an administrator account and print the credentials to the console; this will only happen once. make sure you save them somewhere. the administrator account is the only one that can promote other users to moderator.
(note the production
argument. if called with no arguments, start.sh
will run in a development environment, which uses a separate database.)
this app is made with the assumption that it is being reverse-proxied. as such, you may want to change the port to something other than the default 8080
. you can do that in config.lua
.
after the first time setup is complete, everything is ready to go. put the app behind your reverse proxy and serve it on the web. the app does not run in https by itself, but the reverse proxy can be set up to do that.
once you are able to navigate to the forum, you can log in as the administrator account. other people may also sign up, but they are not able to post until manually verified by an administrator or a moderator. the administrator can promote regular users to moderator.
icons
the icons in the icons/
folder are by Gabriele Malaspina