porom/config.lua
Lera Elvoé 0d7ed52679
NOT DONE YET - allow containerization
a bunch was restructured to make it amenable to docker.

it works fine, except when writing to the db. trying to log in (thus creating a session)
will have Lapis throw "attempt to write a readonly database"
2025-05-23 04:46:10 +03:00

27 lines
527 B
Lua

local config = require("lapis.config")
local secrets = require("secrets.secrets")
config({"development", "production"}, {
port = 8080,
server = "nginx",
code_cache = "off",
num_workers = "1",
sqlite = {
database = "data/db/db.dev.sqlite"
},
secret = "SUPER SECRET",
session_name = "porom_session",
})
config("production", {
code_cache = "on",
logging = {
queries = false,
},
secret = secrets.key,
sqlite = {
database = "data/db/db.prod.sqlite"
},
session_name = "porom_session_s"
})