yuki-kimoto / gitprep

Portable GitHub system into your own server
http://gitprep.yukikimoto.com/
912 stars 117 forks source link

Errors in docker container #176

Closed bilogic closed 3 years ago

bilogic commented 3 years ago

I keep getting errors when trying to start my docker container

# command to create docker container
docker run -d --name gitprep --restart unless-stopped \
    -v /var/www/gitprep/:/home/gitprep/ \
    -p 10020:10020 -p 2222:22 \
    yuki-kimoto/gitprep:2.6.1
# docker logs for above container
tail: no files
Unable to cd to '/home/gitprep'
tail: can't open '/home/gitprep/gitprep/log/production.log': No such file or directory
tail: no files
Unable to cd to '/home/gitprep'
tail: can't open '/home/gitprep/gitprep/log/production.log': No such file or directory
tail: no files

Any idea?

yuki-kimoto commented 3 years ago

I don't know about docker

cd /home/gitprep failed.

Maybe permission problem.

bilogic commented 3 years ago

I tried many ways, now trying pure installation on CentOS 8.

$ yum -y install perl-core

$ export PERL_USE_UNSAFE_INC=1 # from https://github.com/yuki-kimoto/gitprep/issues/134
$ ./setup_module
! Configure failed for Text-Markdown-Hoedown-1.01. See /var/www/gitprep/setup/work/1623669590.63910/build.log for details.
--> Working on Time::Moment
Fetching http://backpan.perl.org/authors/id/C/CH/CHANSEN/Time-Moment-0.38.tar.gz ... OK
Configuring Time-Moment-0.38 ... N/A
! Configure failed for Time-Moment-0.38. See /var/www/gitprep/setup/work/1623669590.63910/build.log for details.
--> Working on Data::Page::Navigation
Fetching http://backpan.perl.org/authors/id/K/KA/KAZEBURO/Data-Page-Navigation-0.06.tar.gz ... OK
Configuring Data-Page-Navigation-0.06 ... N/A
! Configure failed for Data-Page-Navigation-0.06. See /var/www/gitprep/setup/work/1623669590.63910/build.log for details.
! Installing the dependencies failed: Module 'Text::Markdown::Hoedown' is not installed, Module 'Time::Moment' is not installed, Module 'Data::Page::Navigation' is not installed
! Bailing out the installation for ..
1 distribution installed

$ tail /var/www/gitprep/setup/work/1623669590.63910/build.log
Checking if you have ExtUtils::MakeMaker 6.58 ... Yes (7.62)
Configuring Data-Page-Navigation-0.06
Running Makefile.PL
Can't locate inc/Module/Install.pm in @INC (you may need to install the inc::Module::Install module) (@INC contains: /var/www/gitprep/extlib/lib/perl5/x86_64-linux-thread-multi /var/www/gitprep/extlib/lib/perl5 /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5) at Makefile.PL line 1.
BEGIN failed--compilation aborted at Makefile.PL line 1.
-> N/A
-> FAIL Configure failed for Data-Page-Navigation-0.06. See /var/www/gitprep/setup/work/1623669590.63910/build.log for details.
-> FAIL Installing the dependencies failed: Module 'Text::Markdown::Hoedown' is not installed, Module 'Time::Moment' is not installed, Module 'Data::Page::Navigation' is not installed
-> FAIL Bailing out the installation for ..
1 distribution installed

Not sure how to make sense of the errors.

yuki-kimoto commented 3 years ago

Data-Page-Navigation 0.06 depend Module::Install. This is not good. I will fix cpanfile today.

bilogic commented 3 years ago

Thank you!

bilogic commented 3 years ago

Ok, here's what I have tried:

  1. Docker - managed to get the container to run, but it doesn't seem to start the webserver
  2. Build direct on OS - ./setup_module fails

Does CGI require building? Or just clone this repo and point the /gitprep.cgi?

Thank you.

yuki-kimoto commented 3 years ago

I released latest version now.

https://github.com/yuki-kimoto/gitprep/tags

Please retry

./setup_module
yuki-kimoto commented 3 years ago

Does CGI require building?

No. Gitprep run as both web server and CGI.

You can choice both.

# As web server
./gitprep
yuki-kimoto commented 3 years ago

If you use Gitprep as CGI on shared server, the shared server must allow ssh access.

You only copy gitprep directory and run setup_module and setup_database script.

bilogic commented 3 years ago

I released latest version now. https://github.com/yuki-kimoto/gitprep/tags Please retry

./setup_module

Yes, it compiles and I'm able to run it now. Thank you.

If you use Gitprep as CGI on shared server, the shared server must allow ssh access. You only copy gitprep directory and run setup_module and setup_database script.

Yes, I have SSH on shared server. Do you mean on shared server, I must also run setup_module and setup_database? I come from PHP background, not familiar with Perl. Is there a way to just copy files to the shared server and it works?

Thank you.

yuki-kimoto commented 3 years ago

Yes, I have SSH on shared server. Do you mean on shared server, I must also run setup_module and setup_database?

Yes.

I come from PHP background, not familiar with Perl. Is there a way to just copy files to the shared server and it works?

Sorry. GitPrep has dependencies of CPAN modules. By only copy, Gitprep don't work.

bilogic commented 3 years ago

Got it. Thank you.