From e4ff9a71910cf2cb0ae50725d93531c8356a9167 Mon Sep 17 00:00:00 2001 From: John Hsu Date: Wed, 14 Aug 2024 06:18:20 -0700 Subject: [PATCH] FIX webwork startup crash, WEBWORK_ROOT_URL typo Webwork tries to start and dies due missing SQL::Abstract::Classic lib: app-1 | Base class package "SQL::Abstract::Classic" is empty. app-1 | (Perhaps you need to 'use' the module which defines that package first, app-1 | or make that module available in @INC (@INC contains: /opt/webwork/webwork2/lib /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.38.2 /usr/local/share/perl/5.38.2 /usr/lib/x86_64-linux-gnu/perl5/5.38 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl-base /usr/lib/x86_64-linux-gnu/perl/5.38 /usr/share/perl/5.38 /usr/local/lib/site_perl). app-1 | at /opt/webwork/webwork2/lib/WeBWorK/DB/Utils/SQLAbstractIdentTrans.pm line 31. app-1 | BEGIN failed--compilation aborted at /opt/webwork/webwork2/lib/WeBWorK/DB/Utils/SQLAbstractIdentTrans.pm line 31. app-1 | Compilation failed in require at /opt/webwork/webwork2/lib/WeBWorK/DB/Schema/NewSQL/Std.pm line 32. app-1 | BEGIN failed--compilation aborted at /opt/webwork/webwork2/lib/WeBWorK/DB/Schema/NewSQL/Std.pm line 32. app-1 | Compilation failed in require at (eval 426) line 1. WEBWORK_ROOT_URL definition in Dockerfiles used two colons before the port when it's supposed to be only 1. Also deleted version line from docker-compose.dist.yml, as I get a warning message that `version` is obsolete. --- Dockerfile | 3 ++- DockerfileStage1 | 1 + DockerfileStage2 | 2 +- docker-config/docker-compose.dist.yml | 1 - 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 2336f2dcd4..0c3f7ff000 100644 --- a/Dockerfile +++ b/Dockerfile @@ -33,7 +33,7 @@ RUN echo Cloning branch $PG_BRANCH branch from $PG_GIT_URL \ FROM ubuntu:24.04 ENV WEBWORK_URL=/webwork2 \ - WEBWORK_ROOT_URL=http://localhost::8080 \ + WEBWORK_ROOT_URL=http://localhost:8080 \ WEBWORK_SMTP_SERVER=localhost \ WEBWORK_SMTP_SENDER=webwork@example.com \ WEBWORK_TIMEZONE=America/New_York \ @@ -190,6 +190,7 @@ RUN cpanm install -n \ DBD::MariaDB \ Perl::Tidy@20220613 \ Archive::Zip::SimpleZip \ + SQL::Abstract::Classic \ Net::SAML2 \ && rm -fr ./cpanm /root/.cpanm /tmp/* diff --git a/DockerfileStage1 b/DockerfileStage1 index 092b450ee9..541818ecbe 100644 --- a/DockerfileStage1 +++ b/DockerfileStage1 @@ -152,6 +152,7 @@ RUN cpanm install -n \ DBD::MariaDB \ Perl::Tidy@20220613 \ Archive::Zip::SimpleZip \ + SQL::Abstract::Classic \ Net::SAML2 \ && rm -fr ./cpanm /root/.cpanm /tmp/* diff --git a/DockerfileStage2 b/DockerfileStage2 index 59c6828e48..ddd48c17d9 100644 --- a/DockerfileStage2 +++ b/DockerfileStage2 @@ -36,7 +36,7 @@ RUN echo Cloning branch $PG_BRANCH branch from $PG_GIT_URL \ FROM webwork-base:forWW219 ENV WEBWORK_URL=/webwork2 \ - WEBWORK_ROOT_URL=http://localhost::8080 \ + WEBWORK_ROOT_URL=http://localhost:8080 \ WEBWORK_SMTP_SERVER=localhost \ WEBWORK_SMTP_SENDER=webwork@example.com \ WEBWORK_TIMEZONE=America/New_York \ diff --git a/docker-config/docker-compose.dist.yml b/docker-config/docker-compose.dist.yml index 2788d5b278..a168a9f96e 100644 --- a/docker-config/docker-compose.dist.yml +++ b/docker-config/docker-compose.dist.yml @@ -1,4 +1,3 @@ -version: '3.5' services: db: image: mariadb:10.4