From fe92a3543de73d853797f94377b58569f876306d Mon Sep 17 00:00:00 2001 From: Paul Liverman III Date: Mon, 10 Sep 2018 07:04:30 -0700 Subject: [PATCH] similar console addition to passwd0 --- .gitignore | 1 - Dockerfile | 2 ++ app.moon | 4 ++++ run | 15 --------------- 4 files changed, 6 insertions(+), 16 deletions(-) delete mode 100644 .gitignore delete mode 100755 run diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 19e0180..0000000 --- a/.gitignore +++ /dev/null @@ -1 +0,0 @@ -db/ diff --git a/Dockerfile b/Dockerfile index 75ee362..fc24179 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1 +1,3 @@ FROM guard13007/docker-lapis:latest + +RUN luarocks install lapis-console diff --git a/app.moon b/app.moon index 55dea3c..1cd6422 100644 --- a/app.moon +++ b/app.moon @@ -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 diff --git a/run b/run deleted file mode 100755 index eb779fc..0000000 --- a/run +++ /dev/null @@ -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