Coder Social home page Coder Social logo

docker-foswiki's Introduction

docker-foswiki's People

Contributors

bramvan-oosterhout avatar dignin avatar lowrob avatar mar1ad avatar michael34435 avatar mmallejac avatar mrs-mrl avatar timlegge avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker-foswiki's Issues

Build issues with perl-db

Hello
I get the error during the build

perl-db (no such package):
ERROR: unable to select packages:
    required by: world[perl-db]

Has anyone else experienced this?

Regards

Lost login session. Required to login again.

Hi

I am experiencing some problems with the logon session. After logon I browse and edit as an authenticated user and after a while I am prompted to login again. I have tried this with both the OpenID LoginManager and also the default one and I get the same result.

Here I authenticate as the site admin

$Foswiki::cfg{LoginManager} = 'Foswiki::LoginManager::TemplateLogin';
$Foswiki::cfg{Trace}{LoginManager} = 1;
$Foswiki::cfg{UserMappingManager} = 'Foswiki::Users::TopicUserMapping';

I get the following in the foswiki-error.log
In the first case it finds my session and I continue as 'admin'

_SESSION ?(c): ... Found session id 41b2e290d9efa1d371441e435682084f;
SESSION ?(c): loadCreateCGISession called ...
SESSION 41b2e290d9efa1d371441e4356" while reading ..........
2020/10/24 07:37:09 [error] 40#40: *26 FastCGI sent in stderr: "82084f(c): AUTHUSER from session is admin
SESSION 41b2e290d9efa1d371441e435682084f(c): userLoggedIn called with admin - undef

In the 2nd case it finds my session but then something changes and I become 'guest'. I am then asked to login again

_SESSION ?(c): ... Found session id 41b2e290d9efa1d371441e435682084f;
SESSION ?(c): loadCreateCGISession called ...
SESSION 554776ed2b1111da42708fe07a" while reading .....
2020/10/24 07:37:16 [error] 38#38: *53 FastCGI sent in stderr: "9758b5(c): No session, checking URI Params for a user
SESSION 554776ed2b1111da42708fe07a9758b5(c): Falling back to DEFAULT USER: guest
SESSION 554776ed2b1111da42708fe07a9758b5(c): userLoggedIn called with guest - undef

Has anyone experience the same thing?
Any ideas what could be going on

Thanks for your feedback

when checking the setup of solr, an error occurs

Connect to foswiki container
Test the indexing
cd /var/www/foswiki/tools
./solrindex Topic=WebHome
It should show you the files being indexed

resuls in

/var/www/foswiki/tools # ./solrindex Topic=WebHome
ERROR: Could not parse JSON response: malformed JSON string, neither tag, array, object, number, string or atom, at character offset 0 (before "Can't connect to sol...") at /var/www/foswiki/lib/WebService/Solr/Response.pm line 40.
Can't connect to solr:8983 (Name does not resolve)

Multiple instances in production

Hello Tim,

First I wish you a very hapy new year 2020 !

I've improved my knowledge about docker and docker-compose. Especially about Traefik : this tool is one of the most used proxy application used in combination with containers, Docker but also Kubernetes, Rancher and so on. It is super nice, for instance it can handle the HTTPS certificate handling for you.

I have to run multiple Foswiki instances and having Traefik in the equation adds some constrains, especially on the Docker networks : all services proxied by Traefik have to run on the same network.

The diagram on the top of this page illustrates this very well : the blue network that links both Nginx to Traefik is the common network, but inside each service another network is defined, so that only the strictly necessary traffic goes on the common network.

So with this in mind, I think we could improve the Foswiki service architecture a little bit. The main change would be to exclude Nginx from the Dockerfile and include it as a standalone image, as Solr is already.

Would you agree that we move into this direction ?

Cheers,
Michel

File attachment size

Hello Tim,

Hope you're doing good.
I've noticed that attachment size is limited to 1M, most probably the default value for Nginx. Is that on purpose ? I would set it to 10M to address our own needs.

What do you think ?

All the best,
Michel

odt2txt is not included in docker-foswiki image

Hello Tim,

I think we have an issue with Solr : this guy is not able to index .odt files :

bash-5.0# ./solrindex
Indexing topic Administratif.ContratRosa
Indexing attachment Administratif.ContratRosa.Fiche_heures.ods
ERROR: exec of odt2txt --encoding=UTF-8 %FILENAME|F% failed: No such file or directory
I've simply removed the few .ods files that we had in our wiki :-)
I'll probably open an issue with Solr, not very important anyway.

Also I don't think that the tools/solrjob work despite bash is present, I need to investigate more on this.

Personally, I set :

{SolrPlugin}{EnableOnSaveUpdates}
{SolrPlugin}{EnableOnUploadUpdates}
Then I run once a tools/solrindex web=Myweb to index the content imported from my old wiki instance. Next, not sure that a cron job should be set up to index the entire content. That would be for peace of mind only with these settings. I am not sure anyway how to cron within a docker container !

Docker image build fails - perl-db_file (no such package):

Hello

For info. The build breaks this PM. It ran ok this morning.
What has changed?
.
.

Executing busybox-1.32.0-r7.trigger
OK: 6 MiB in 14 packages
OK: 6 MiB in 14 packages
perl-db_file (no such package):
ERROR: unable to select packages:
required by: world[perl-db_file]
perl-db_file-lock (no such package):
required by: world[perl-db_file-lock]

.
.

Thanks for any feedback

Issues when accessing via upstream proxy with additional path

I've got docker-foswiki running well with the "stock" docker compose configuration, but am having a few issues when I try to put another (nginx) proxy in front of it and access foswiki thru that. (It's possible some of this could be in the foswiki app itself but figured I would try here since I am running via docker-foswiki ๐Ÿ™‚ )

If I use an nginx proxy config with a separate virtual host name and no additional path info (for example "wiki.example.com" proxying to "http://my-docker-foswiki-host.example.cpm:8765" then it seems to "mostly" work, I have seen a couple random issues with some pages that seem to display a "dialog" type overlay (like "New" and "copy") sometimes not working but I'm thinking those may be browser-specific problems and/or issues with my internal HTTPS cert as I just tried again with a clean firefox install and they worked flawlessly.

The main issue I'm running into is if I attempt place an additional path in my upstream proxy (for example "home.example.com/wiki" proxying to "http://my-docker-foswiki-host.example.cpm:8765") then it seems like foswiki is rendering all the links without the "/wiki" component in the path so then none of the CSS/script URLs load and all the page content links that display are wrong (they all use "home.example.com//").

I'm fairly certain I have my foswiki config/security settings correct, I definitely have all the possible URL variations set in PermittedRedirectHostUrls. I'm also not certain if I'm missing something from my upstream proxy config. Essentially I'm just using this block within my "home.example.com" server block:

  # proxy to foswiki via path
  location /wiki {
    proxy_pass              http://my-docker-foswiki-host.example.com:8765/;
}

I've also tried adding

proxy_set_header        X-Real-IP       $remote_addr;
proxy_set_header        X-Forwarded-For $proxy_add_x_forwarded_for;

both together or individually but it doesn't seem to change anything.

I'm admittedly not an expert with configuring nginx so it's very possible I'm missing something obvious but not sure exactly where to look or the best way to debug the issues i'm encountering with this configuration. TIA!

typo

Hi in your dockerfile you have "DefaultUrlHost" set twice.
thx

Solr instal

Hello again,

Not being familiar yet with docker (learning !), I am wondering about the Solr install.

Should I use docker-compose with the solr docker image and combine it with your using docker-compose ? Or should it be installed within your docker image ?

Also which version of Solr should I use here ? The SolrPlugin page mention 5 or later : is the latest Solr image (8.3.0) fine ?

Many thanks !
Michel

Errors with statistics and solr - this IndexWriter is closed

Hi
I have recently started to get error messages from the solr index and statistics jobs

the error message includes

ERROR: 500 Server Error: {"responseHeader":{"status":500,"QTime":1},"error":{"msg":"this IndexWriter is closed","trace":"org.apache.lucene.store.AlreadyClosedException: this IndexWriter is closed\n\tat org.apache.lucene.index.IndexWriter.ensureOpen(IndexWriter.java:720)\n\tat

Any suggestions? Should I delete the solr indexing?

Thanks for your feedback

Can't find mentioned .env-file

Hello Timothey,

thanks for your valuable work!

In your README you mention a .env-file that should be copied and modified. Unfortunately, I can't find this file anywhere. Could you provide that file please?

Regards,
Alexander

Request: Healthcheck

It might be a worthwhile idea to have the FosWiki container to have some form of healthcheck (curl, dig or similar) so that alerts/actions can occur if there's an issue with the database/web server.

Request: Open ID Connect Authentication with OpenIDLoginContrib

To be more secure, the ability to setup 2fa would be greatly appreciated.

Unfortunately it requires the following dependencies:

MIME::Base64 | ย  | Required
LWP::UserAgent | >=6.15 | Required for OAuth 2 Server Flow
Crypt::JWT | >=0.010 | Required for JWT signature verification
Crypt::Random | ย  | Required for cryptographically secure nonces
JSON | ย  | Required

See: https://foswiki.org/Extensions/OpenIDLoginContrib

Would it be possible to add these dependencies to the image at all? I understand you had to do some work with Alpine, unsure if this would be required.

Thanks!

Build ERROR: perl-dbd-sqlite

Hi

Today, 09-Aug I get an error on the build

ERROR: perl-dbd-sqlite-1.70-r0: BAD signature

Anyone else see this?

Error with Container ID

When I attempt to run the provided command (docker run -idt -p 80:80 timlegge/docker-foswiki) to pull and run this docker image, I get an error:

"docker: failed to register layer: Error processing tar file(exit status 1): Container ID 378950266 cannot be mapped to a host ID."

According to this link (https://circleci.com/docs/2.0/high-uid-error/) the issue is with the UID/GID of files that exist in the layer being outside the acceptable range (0-65535) and that I, the user trying to pull the image, can't fix this; the person who built the image has to fix it.

If there is a workaround instead, I am all ears. Thank you!

PDF support

Hi
Not really an issue , more of a suggestion to support GenPDFAd

I added the following to a local copy of the Dockerfile

#PDF dependencies RUN curl -L -o master.zip \ https://github.com/michaelrsweet/htmldoc/archive/refs/heads/master.zip \ && unzip master.zip -q \ && rm master.zip \ && mv htmldoc-master /tmp \ && chmod -R 777 /tmp/htmldoc-master \ && cd /tmp/htmldoc-master \ && ./configure --silent \ && make --silent \ && make install

I got genpdf to work well with the above.
Do you think this or something similar would be useful for future version?

First steps after install

Hello !

Thanks for this very nice project. I am using Foswiki for quite a long time now, and this Docker image is exactly what I was looking for.

After starting the image, how can I access the configure page ? It looks like the admin password does not exist yet and I cannot find a way to set it up.

Thanks in advance !
Michel

Problems installing DB_File

Hi
The Dockerfile contains the following to install DB_FILE.

   rm -fr /var/cache/apk/APKINDEX.* && \
    perl -MCPAN -e 'install DB_File' && \
    perl -MCPAN -e "CPAN::Shell->notest('install', 'DB_File::Lock')" && \

I now get an error during the build

/usr/bin/perl Makefile.PL -- OK
Running make for P/PM/PMQS/DB_File-1.855.tar.gz
make: /bin/sh: Operation not permitted
make: *** [Makefile:418: blib/lib/.exists] Error 127
PMQS/DB_File-1.855.tar.gz
/usr/bin/make -- NOT OK

It worked fine for me in early January
What could be wrong here?
Thanks for your feedback

Better separation between code and data

Hi Tim,

How are you ?

I am wondering about the way the Docker volume foswiki_www is currently done, since it contains both data and code.

Now we still have to manually proceed with the extensions upgrade, which seems counter-intuitive to me, especially in a Dockerized world. Wouldn't it be beneficial to have only data in the volumes ? This way it would be enough to pull a newer Docker image and restart the container to be up-to-date. More like a black-box thing.

I know a bit about the Foswiki folder structure, but not enough to foresee the implications of such change. That would also imply to have enough extensions provided with the images so that most of the users are ok with that (this is probably already the case). The other ones would have to add their specific extensions within the Dockerfile and build their own image.

What do you think ?

Take care,
Michel

Missing assets / nginx 502

I could not get uploaded images to show. The nginx log was indicating a missing Perl module:
[error] 20#20: *19 FastCGI sent in stderr: "Can't locate File/MMagic/XS.pm in @INC (you may need to install the File::MMagic::XS module) (@INC contains: /var/www/foswiki/lib . /usr/local/lib/perl5/site_perl /usr/local/share/perl5/site_perl /usr/lib/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib/perl5/core_perl /usr/share/perl5/core_perl /var/www/foswiki/lib/CPAN/lib) at /var/www/foswiki/lib/Foswiki/Contrib/XSendFileContrib.pm line 25.

I solved it by installing the plugin this way:

apk add linux-headers g++ make perl-dev
perl -MCPAN -e 'install (File::MMagic::XS)'

Problem with ImagePlugin build fails due to dependency

Hello

Thanks Tim for this contribution

I have been using this distrubition for a while without issue but coming back to it in Septemeber I have problems with the Dockerfile unless I comment out the ImagePlugin installation

tools/extension_installer ImagePlugin -r -enable install

The installer cannot find the Image::Magick dependency.

I think it is a problem with teh Plugin itself rather than your code but I thought it is worth pointing out to you anyway

Regards

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.