timlegge / docker-foswiki Goto Github PK
View Code? Open in Web Editor NEWThis project forked from michael34435/docker-foswiki
Dockerized foswiki + nginx at port 80
License: MIT License
This project forked from michael34435/docker-foswiki
Dockerized foswiki + nginx at port 80
License: MIT License
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
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
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)
the solr configs for Solr 6, 7 and 8 are attached to issue #6
Add the updated versions to the docker image
solr.8.3.0.tar.gz
solr6.6.6.tar.gz
solr7.7.2.tar.gz
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
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
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 !
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
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!
I'm trying to test some tweaks to the Dockerfile
using Alpine edge
but it seems like there are some upstream Alpine packaging conflicts that prevent docker build .
from working at all.
Seems like you've already reported the issue against Alpine but I don't see any feedback or resolution to the issue.
Do you have any workarounds in the meantime to get around the packaging issue?
Hi in your dockerfile you have "DefaultUrlHost" set twice.
thx
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
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
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
docker-foswiki/https/nginx.default.conf
Line 61 in 460b40d
viewfile based protection is really bad infact.
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.
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!
Hi
Today, 09-Aug I get an error on the build
ERROR: perl-dbd-sqlite-1.70-r0: BAD signature
Anyone else see this?
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!
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?
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
please have a look at nginx config settings at https://foswiki.org/Support/FoswikiOnNginx.
tag v1.13 v1.14 points to master that is breaked (xsendfile don't work, cause it needs perl mmagic). Image v1.13,v1.14 on docker hub don't work
tag 1.13 is ok
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
Prior to login clicking on the System Web or the Help Menu items results in a redirect loop:
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
This is clearly well-known to you - see https://foswiki.org/Support/Question1997
Did you ever get past this?
Thanks for your useful package!
WebChanges don't work as expected. Sometimes freezes the browser
commit 83021e5
Next release of Perl will remove support for Locale::Languages, Locale::Codes and Locale::Country you need to install Locale::Codes from CPAN
Pull request alpinelinux/aports#8010 was submitted to Alpine Linux for the package.
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)'
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
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.