docker-compose build fails
Opened this issue · 28 comments
WARNING: The LAPIS_CONFIG variable is not set. Defaulting to a blank string.
Building psql
Step 1/2 : FROM postgres:latest
latest: Pulling from library/postgres
6f28985ad184: Pull complete
163a60947b3a: Pull complete
1791984387e5: Pull complete
ccf9c39579c4: Pull complete
1d8dd50a5ee9: Pull complete
3991abc55a94: Pull complete
4cf2cdef0857: Pull complete
ed1bec410498: Pull complete
0930368b9a14: Pull complete
a9302936fdb5: Pull complete
bb3d505cd0cb: Pull complete
4f1bb2dd6f16: Pull complete
8d3f6ff7b2da: Pull complete
687caf1b1f9b: Pull complete
Digest: sha256:c83014a2b46834ef6d17f64c8e4a70089901a8c0dee158f1ca5ccae032ea32e5
Status: Downloaded newer image for postgres:latest
---> c5ec7353d87d
Step 2/2 : ADD 1-init.sql /docker-entrypoint-initdb.d/1-init.sql
---> 7b2815168ee4
Successfully built 7b2815168ee4
Successfully tagged lapis-chan_psql:latest
Building app
Step 1/13 : FROM openresty/openresty:centos-rpm
centos-rpm: Pulling from openresty/openresty
7a0437f04f83: Pull complete
524d2816f238: Pull complete
bac388b0eb31: Pull complete
af594c9d130f: Pull complete
Digest: sha256:7af079e8632bebe8c90cfaa3133370cdd778f7dcc46745032bcd0b7d0ea4eb51
Status: Downloaded newer image for openresty/openresty:centos-rpm
---> 854124155a28
Step 2/13 : LABEL maintainer="Landon Manning <lmanning17@gmail.com>"
---> Running in c21db410e686
Removing intermediate container c21db410e686
---> 8bf1b8aa2e19
Step 3/13 : ARG GIFLIB_VERSION="5.1.1"
---> Running in 406a42b0e092
Removing intermediate container 406a42b0e092
---> 94163c007cc9
Step 4/13 : ARG OPENSSL_DIR="/usr/local/openresty/openssl"
---> Running in 6cea2a94323b
Removing intermediate container 6cea2a94323b
---> c2938b413ec1
Step 5/13 : RUN yum -y install --nogpgcheck https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm https://mirrors.rpmfusion.org/free/el/rpmfusion-free-release-8.noarch.rpm https://mirrors.rpmfusion.org/nonfree/el/rpmfusion-nonfree-release-8.noarch.rpm && yum config-manager --set-enabled PowerTools
---> Running in 0e0a6f1ade8c
CentOS Linux 8 - AppStream 18 MB/s | 6.3 MB 00:00
CentOS Linux 8 - BaseOS 2.7 MB/s | 2.3 MB 00:00
CentOS Linux 8 - Extras 41 kB/s | 9.2 kB 00:00
Official OpenResty Open Source Repository for C 44 kB/s | 65 kB 00:01
epel-release-latest-8.noarch.rpm 369 kB/s | 22 kB 00:00
rpmfusion-free-release-8.noarch.rpm 20 kB/s | 11 kB 00:00
rpmfusion-nonfree-release-8.noarch.rpm 30 kB/s | 11 kB 00:00
Dependencies resolved.
================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
epel-release noarch 8-10.el8 @commandline 22 k
rpmfusion-free-release noarch 8-0.1 @commandline 11 k
rpmfusion-nonfree-release noarch 8-0.1 @commandline 11 k
Transaction Summary
================================================================================
Install 3 Packages
Total size: 44 k
Installed size: 40 k
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Installing : epel-release-8-10.el8.noarch 1/3
Installing : rpmfusion-free-release-8-0.1.noarch 2/3
Installing : rpmfusion-nonfree-release-8-0.1.noarch 3/3
Running scriptlet: rpmfusion-nonfree-release-8-0.1.noarch 3/3
Verifying : epel-release-8-10.el8.noarch 1/3
Verifying : rpmfusion-free-release-8-0.1.noarch 2/3
Verifying : rpmfusion-nonfree-release-8-0.1.noarch 3/3
Installed:
epel-release-8-10.el8.noarch rpmfusion-free-release-8-0.1.noarch
rpmfusion-nonfree-release-8-0.1.noarch
Complete!
Error: No matching repo to modify: PowerTools.
ERROR: Service 'app' failed to build: The command '/bin/sh -c yum -y install --nogpgcheck https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm https://mirrors.rpmfusion.org/free/el/rpmfusion-free-release-8.noarch.rpm https://mirrors.rpmfusion.org/nonfree/el/rpmfusion-nonfree-release-8.noarch.rpm && yum config-manager --set-enabled PowerTools' returned a non-zero code: 1
Ubuntu 20.04 LTS
5.4.0-26-generic
2155133
Try building it again? That PowerTools repo should absolutely be available.
Try building it again? That PowerTools repo should absolutely be available.
Unfortunately it still gives the same error. Also tried it on my local machine (5.11.5-arch1-1) but gave the same error there.
Try changing it to powertools
all lower. It would seem that PowerTools
used to work but now only nocaps works?
Try changing it to
powertools
all lower. It would seem thatPowerTools
used to work but now only nocaps works?
Sure enough, that fixed it. Thank you!
Sorry to ask about an unrelated issue here, can move it if needed, just a quick question: when I run ./prod.sh
I only see the stock openresty page on my server, can't see lapis-chan anywhere... are there more configuration steps not mentioned in the readme?
There shouldn't be, unless I forgot something. What happens if you run ./dev.sh
instead?
There shouldn't be, unless I forgot something. What happens if you run
./dev.sh
instead?
Same thing; I do notice that openresty is running on my machine itself rather than in docker-compose, is that correct?
it should definitely not be outside of docker, perhaps you have a different openresty running as well? try accessing localhost:1000 or localhost:1001
it should definitely not be outside of docker, perhaps you have a different openresty running as well? try accessing localhost:1000 or localhost:1001
:1000 is a dead end, :1001 gives this:
stack traceback:
[C]: in function 'assert_error'
./src/apps/web/internal/check_ban.lua:14: in function 'filter'
...cal/openresty/luajit/share/lua/5.1/lapis/application.lua:18: in function 'run_before_filter'
...cal/openresty/luajit/share/lua/5.1/lapis/application.lua:348: in function 'handler'
...cal/openresty/luajit/share/lua/5.1/lapis/application.lua:146: in function 'resolve'
...cal/openresty/luajit/share/lua/5.1/lapis/application.lua:183: in function <...cal/openresty/luajit/share/lua/5.1/lapis/application.lua:181>
[C]: in function 'xpcall'
...cal/openresty/luajit/share/lua/5.1/lapis/application.lua:189: in function 'super'
./app.lua:30: in function 'dispatch'
/usr/local/openresty/luajit/share/lua/5.1/lapis/nginx.lua:231: in function 'serve'
content_by_lua(nginx.conf.compiled:42):1: in main chunk
I suspect this is a remnant from when I tried using the 1.2.5 tag -- I'll do a clean image and start over but I would like to see if I can get it working before that too. Doing a clean image now; will be easier.
looks like 1001
is the entry point!
master is probably a bit broken atm, i was in the middle of refactoring most of the code but i kinda forgot to finish it. afaik it shoudl at least run, but not necessarily correctly, hah.
looks like
1001
is the entry point!master is probably a bit broken atm, i was in the middle of refactoring most of the code but i kinda forgot to finish it. afaik it shoudl at least run, but not necessarily correctly, hah.
Is there a specific commit I should use? Preferable using the super-easy (mostly) docker-compose install. Working on re-setting things up; maybe master will work.
I was having similar errors trying 1.2.5; could get to the app but just got lua errors.
Oh, you know, it's probably just a bad error that is suggesting that you need to add your "secrets"
Oh, you know, it's probably just a bad error that is suggesting that you need to add your "secrets"
Huh, weird -- I added token.lua and salt.lua. Will see what happens this time around, I'm just about back to having it running.
Yep, back to this on :1001 -- nothing on :80 now.
stack traceback:
[C]: in function 'assert_error'
./src/apps/web/internal/check_ban.lua:14: in function 'filter'
...cal/openresty/luajit/share/lua/5.1/lapis/application.lua:18: in function 'run_before_filter'
...cal/openresty/luajit/share/lua/5.1/lapis/application.lua:348: in function 'handler'
...cal/openresty/luajit/share/lua/5.1/lapis/application.lua:146: in function 'resolve'
...cal/openresty/luajit/share/lua/5.1/lapis/application.lua:183: in function <...cal/openresty/luajit/share/lua/5.1/lapis/application.lua:181>
[C]: in function 'xpcall'
...cal/openresty/luajit/share/lua/5.1/lapis/application.lua:189: in function 'super'
./app.lua:30: in function 'dispatch'
/usr/local/openresty/luajit/share/lua/5.1/lapis/nginx.lua:231: in function 'serve'
content_by_lua(nginx.conf.compiled:42):1: in main chunk
Oh, that may just be one of the things that stopped working while i've been transitioning the code, heh. It's trying to check your IP/etc to see if you're banned but i think that function is currently broken.
https://github.com/karai17/lapis-chan/tree/68f6d4139acc4ac59707c44608dfdd9b42f6d7ae
This commit might work better, it has the docker upgrades but none of the API stuff i was working on, so it's kinda like 1.2.5 but better?
Oh, that may just be one of the things that stopped working while i've been transitioning the code, heh. It's trying to check your IP/etc to see if you're banned but i think that function is currently broken.
https://github.com/karai17/lapis-chan/tree/68f6d4139acc4ac59707c44608dfdd9b42f6d7ae
This commit might work better, it has the docker upgrades but none of the API stuff i was working on, so it's kinda like 1.2.5 but better?
Doh! So close but no cigar. That commit is giving me this:
Error
...cal/openresty/luajit/share/lua/5.1/lapis/db/postgres.lua:103: SELECT * from "boards" order by boards.group asc, short_name asc
ERROR: column "short_name" does not exist (51)
Traceback
stack traceback:
[C]: in function 'error'
...cal/openresty/luajit/share/lua/5.1/lapis/db/postgres.lua:103: in function 'select'
...l/openresty/luajit/share/lua/5.1/lapis/db/base_model.lua:412: in function 'get_boards'
./src/apps/web/pages/index.lua:5: in function 'handler'
...cal/openresty/luajit/share/lua/5.1/lapis/application.lua:146: in function 'resolve'
...cal/openresty/luajit/share/lua/5.1/lapis/application.lua:183: in function <...cal/openresty/luajit/share/lua/5.1/lapis/application.lua:181>
[C]: in function 'xpcall'
...cal/openresty/luajit/share/lua/5.1/lapis/application.lua:189: in function 'dispatch'
/usr/local/openresty/luajit/share/lua/5.1/lapis/nginx.lua:231: in function 'serve'
content_by_lua(nginx.conf.compiled:35):1: in main chunk
Do I need to re-create the DB or is it stored in the lapis-chan dir?
you probably want to destroy the db volume and rebuild it all, yeah
Hmm, still getting the same error after a docker system prune -a
and docker-compose build
-- is there something I'm missing?
EDIT: The DB isn't stored in a container is it... lol
it's stored in a volume.
docker volume rm lapischan-postgres
or something like that.
it's stored in a volume.
docker volume rm lapischan-postgres
or something like that.
Oh of course those aren't cleared by docker system prune -a
lol.
Now it's failing to start, complaining about the database being uninitialized and not having a superuser password specified:
psql_1 | Error: Database is uninitialized and superuser password is not specified.
psql_1 | You must specify POSTGRES_PASSWORD to a non-empty value for the
psql_1 | superuser. For example, "-e POSTGRES_PASSWORD=password" on "docker run".
psql_1 |
psql_1 | You may also use "POSTGRES_HOST_AUTH_METHOD=trust" to allow all
psql_1 | connections without a password. This is *not* recommended.
psql_1 |
psql_1 | See PostgreSQL documentation about "trust":
psql_1 | https://www.postgresql.org/docs/current/auth-trust.html
Yeah, postgres added some bullshit that forces you to add a password or some nonsense.
https://github.com/karai17/lapis-chan/blob/master/docker-compose.yml#L11
Yeah, postgres added some bullshit that forces you to add a password or some nonsense.
https://github.com/karai17/lapis-chan/blob/master/docker-compose.yml#L11
It's aliiiiveeee!! :D Didn't notice that that env setting had disappeared :P
Thank you so much for your help! I'm happy to make a PR regarding the PowerTools thing if you like. :)
Sure thing :) One of these days i'll get around to finishing the refactor and release a v2.0 that is fully api-driven!
Sure thing :) One of these days i'll get around to finishing the refactor and release a v2.0 that is fully api-driven!
Oh and, last question I swear :P How should I change the port from 1001? Assuming I want to add HTTPS, should I just proxy it with nginx on the machine itself?
Also info on setting up an admin would be awesome ;) I see mentions of logging in in the code but nothing on the UI?
You'd want to have a reverse proxy in front of lapchan. I've not gotten far enough in my knowledge on docker to fully understand how to get clusters and the likes set up but that's the goal eventually~
When lapchan first loads, maybe not on that commit but one around there, there shoudl be an install page that lets up the admin account adn your first board.
Hmm, I've tried quite a few different commits; some of them /admin loads but I haven't seen an install page.
Concerning. :P
Any of the commits before the one that says install.lua disabled shoooould work~