dockerfile

This commit is contained in:
Cadey Ratio 2019-12-24 16:48:02 +00:00
parent bb247b0ec0
commit 19c26822ac
6 changed files with 30 additions and 10 deletions

1
.dockerignore Normal file
View File

@ -0,0 +1 @@
lua_modules

5
Dockerfile Normal file
View File

@ -0,0 +1,5 @@
FROM xena/lua:5.3
WORKDIR /ketracel
COPY . .
ENV PATH $PATH:/root/.luarocks/bin
RUN ./scripts/build_docker.sh

5
bin/ketracel Executable file
View File

@ -0,0 +1,5 @@
#!/bin/sh
export LUA_PATH='/root/.luarocks/share/lua/5.3/?.lua;/root/.luarocks/share/lua/5.3/?/init.lua'
export LUA_CPATH='/root/.luarocks/lib/lua/5.3/?.so'
lua5.3 -l ketracel

View File

@ -7,22 +7,26 @@ description = {
homepage = "https://tulpa.dev/cadey/ketracel",
license = "0bsd",
summary = "a small security bot for ngircd",
labels = {
"irc",
"security"
}
--labels = {
-- "irc",
-- "security"
--}
}
dependencies = {
"lua ~> 5.3",
"irc-engine",
"luasocket",
}
build_dependencies = {
"moonscript",
"busted",
}
build = {
type = "builtin",
modules = {}
modules = {
["ketracel"] = "src/ketracel.lua",
["irce.modules.oper"] = "src/irce/modules/oper.lua",
},
install = {
bin = {
"bin/ketracel",
}
}
}

5
scripts/build_docker.sh Executable file
View File

@ -0,0 +1,5 @@
#!/bin/sh
apk --no-cache add lua5.3-moonscript
moonc-5.3 `find -type f | grep 'moon$'`
luarocks-5.3 make --local ./ketracel*.rockspec

View File

@ -2,7 +2,7 @@ irce = require "irce"
socket = require "socket"
config =
server: "127.0.0.1"
server: os.getenv("IRC_HOST") or "127.0.0.1"
nick: os.getenv("IRC_NICK") or "Ketracel"
user: os.getenv("IRC_USER") or "white"
real: os.getenv("IRC_REAL") or "The favorite of the Jem'Hadar"