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", homepage = "https://tulpa.dev/cadey/ketracel",
license = "0bsd", license = "0bsd",
summary = "a small security bot for ngircd", summary = "a small security bot for ngircd",
labels = { --labels = {
"irc", -- "irc",
"security" -- "security"
} --}
} }
dependencies = { dependencies = {
"lua ~> 5.3", "lua ~> 5.3",
"irc-engine", "irc-engine",
"luasocket", "luasocket",
} }
build_dependencies = {
"moonscript",
"busted",
}
build = { build = {
type = "builtin", 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" socket = require "socket"
config = config =
server: "127.0.0.1" server: os.getenv("IRC_HOST") or "127.0.0.1"
nick: os.getenv("IRC_NICK") or "Ketracel" nick: os.getenv("IRC_NICK") or "Ketracel"
user: os.getenv("IRC_USER") or "white" user: os.getenv("IRC_USER") or "white"
real: os.getenv("IRC_REAL") or "The favorite of the Jem'Hadar" real: os.getenv("IRC_REAL") or "The favorite of the Jem'Hadar"