Skip to content

Commit

Permalink
Merge branch 'itchio'
Browse files Browse the repository at this point in the history
  • Loading branch information
leafo committed Feb 16, 2021
2 parents ccdd47e + e6323b0 commit eb383b4
Show file tree
Hide file tree
Showing 5 changed files with 151 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lapis-archlinux-itchio/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/luarocks
/lua
/lua_modules
/.luarocks
22 changes: 22 additions & 0 deletions lapis-archlinux-itchio/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
FROM archlinux/base:latest
MAINTAINER leaf corcoran <[email protected]>

RUN pacman -Syu base-devel lua51 postgresql postgresql-libs luarocks redis geoip libmaxminddb tup git npm sassc pygmentize discount --noconfirm && \
(yes | pacman -Scc || :) && \
npm install -g [email protected] && \
npm install -g uglify-js

# setup openresty
RUN curl -O https://openresty.org/download/openresty-1.19.3.1.tar.gz && \
tar xvfz openresty-1.19.3.1.tar.gz && \
(cd openresty-1.19.3.1 && \
./configure --with-pcre-jit --with-http_geoip_module --with-cc-opt="-I/usr/include/openssl-1.0" --with-ld-opt="-L/usr/lib/openssl-1.0" && \
make && make install) && \
rm -rf openresty-1.19.3.1 && rm openresty-1.19.3.1.tar.gz

# setup postgresql
RUN su postgres -c "initdb --locale en_US.UTF-8 -E UTF8 -D '/var/lib/postgres/data'" && mkdir /run/postgresql && chown postgres:postgres /run/postgresql

# install lua dependencies
COPY itchio-dev-1.rockspec luarocks.lock /
RUN luarocks --lua-version=5.1 build --local --only-deps /itchio-dev-1.rockspec
18 changes: 18 additions & 0 deletions lapis-archlinux-itchio/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
PHONY: install_deps build deploy

# this will update the lockfile to record all the dependencies, the lockfile will be uploaded to docker when building the image
install_deps:
-rm -r .luarocks
-rm -r lua_modules/
luarocks --lua-version=5.1 init
luarocks --lua-version=5.1 build --only-deps --pin

# we use no-cache here since we run pacman -Syu and we would like to always
# update the system to the latest before uploading the image, and not use the
# stall installation of packages
build:
docker build --no-cache -t ghcr.io/leafo/lapis-archlinux-itchio .

deploy:
docker push ghcr.io/leafo/lapis-archlinux-itchio

51 changes: 51 additions & 0 deletions lapis-archlinux-itchio/itchio-dev-1.rockspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
package = "itchio"
version = "dev-1"

source = {
url = "git:https://[email protected]:itchio/itchio-site.git"
}

description = {
summary = "the itch.io",
homepage = "https://itch.io",
license = "proprietary"
}

dependencies = {
"lua ~> 5.1",
"moonscript",
"bcrypt",
"luabitop",
"busted",

-- these should install from master
"lapis",
-- "lapis-community",

"lapis-exceptions ~> 2",
"lapis-bayes ~> 1.1",
"lapis-console ~> 1.2",
"lapis-systemd ~> 1.0",
"lapis-redis ~> 1.0",
"cloud_storage ~> 1.1",
"mailgun ~> 1.2",
"web_sanitize ~> 1.1",
"magick ~> 1.6",
"tableshape ~> 2.2",
"sitegen ~> 0.1",
"giflib ~> 1.0",
"lua-twitter ~> 1.0",
"luajit-geoip ~> 2.1",
"payments ~> 1.0",

"basexx",
"cmark",
"lrandom",
"lpeg_patterns",
"redis-lua 2.0.4",
}

build = {
type = "none"
}

56 changes: 56 additions & 0 deletions lapis-archlinux-itchio/luarocks.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
return {
dependencies = {
["alt-getopt"] = "0.8.0-1",
ansicolors = "1.0.2-3",
basexx = "0.4.1-1",
bcrypt = "2.1-6",
busted = "2.0.0-1",
cloud_storage = "1.1.0-1",
cmark = "0.29.0-1",
cosmo = "16.06.04-1",
date = "2.1.3-1",
dkjson = "2.5-2",
etlua = "1.3.0-1",
giflib = "1.0.0-1",
inifile = "1.0-2",
lapis = "1.8.3-1",
["lapis-bayes"] = "1.1.0-1",
["lapis-console"] = "1.2.0-1",
["lapis-exceptions"] = "2.1.0-1",
["lapis-redis"] = "1.0.0-1",
["lapis-systemd"] = "1.0.0-1",
loadkit = "1.1.0-1",
lpeg = "1.0.2-1",
lpeg_patterns = "0.5-0",
lrandom = "20180729-1",
lua = "5.1-1",
["lua-cjson"] = "2.1.0.6-1",
["lua-discount"] = "1.2.10.1-1",
["lua-term"] = "0.7-1",
["lua-twitter"] = "1.0.0-1",
lua_cliargs = "3.0-2",
luabitop = "1.0.2-3",
luaexpat = "1.3.3-1",
luafilesystem = "1.8.0-1",
["luajit-geoip"] = "2.1.0-1",
luaossl = "20200709-0",
luasec = "1.0-1",
luasocket = "3.0rc1-2",
luassert = "1.8.0-0",
luasystem = "0.2.1-0",
magick = "1.6.0-1",
mailgun = "1.2.0-1",
mediator_lua = "1.1.2-0",
mimetypes = "1.0.0-2",
moonscript = "0.5.0-1",
payments = "1.0.0-1",
penlight = "1.9.2-1",
pgmoon = "1.12.0-1",
["redis-lua"] = "2.0.4-1",
say = "1.3-1",
sitegen = "0.1-1",
syntaxhighlight = "1.0.0-1",
tableshape = "2.2.0-1",
web_sanitize = "1.1.0-1"
},
}

0 comments on commit eb383b4

Please sign in to comment.