similar console addition to passwd0

This commit is contained in:
Paul Liverman III 2018-09-10 07:04:30 -07:00
parent 5b133e6998
commit fe92a3543d
4 changed files with 6 additions and 16 deletions

1
.gitignore vendored
View File

@ -1 +0,0 @@
db/

View File

@ -1 +1,3 @@
FROM guard13007/docker-lapis:latest
RUN luarocks install lapis-console

View File

@ -1,4 +1,5 @@
lapis = require "lapis"
console = require "lapis.console"
import Sessions, Deltas from require "models"
import api, abort from require "helpers"
@ -41,5 +42,8 @@ fns = {
}
class extends lapis.Application
[console: "/console/#{config.secret}"]: =>
return console.make(env: "all")(@)
[session: "/0/:id[a-fA-F%d]"]: api fns
[new_session: "/0/new"]: api fns

15
run
View File

@ -1,15 +0,0 @@
#!/usr/bin/env bash
docker stop dt0
docker rm dt0
docker stop dt-db
docker rm dt-db
docker network create web
docker network create dt-db
docker build -t dt0 .
docker run -d --restart always --name dt-db --network dt-db \
-v "$PWD/db":/var/lib/postgresql/data postgres:10.5-alpine
sleep 5 # give Postgres time to start
docker run -d --restart always --name dt0 --network dt-db \
dt0:latest
docker network connect web dt0