Giter Club home page Giter Club logo

docker-grav's People

Contributors

coldestheart avatar dependabot[bot] avatar dsavell avatar hughbris avatar miroka96 avatar renovate[bot] avatar toshichi avatar tyzbit 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

docker-grav's Issues

SMTP emailing issues

Dear David,

I discovered an issue related to the grav-admin module. The forgot password functionality (or any email notification) was not sending emails. The exception traceback routed the problem in the EHLO and HELO SMTP protocol commands resulting in a 501 (invalid domain address).

The nginx configuration /etc/nginx/conf.d/default.conf has a setting,

server_name _;

This should be changed to,

server_name $hostname;

After restarting the container, the email notifications began working as advertised.

I have a temporary solution in post-processing (which could be included in the Dockerfile):

sed -i 's/server_name.*/server_name $hostname;/' /etc/nginx/conf.d/default.conf

Thanks for the awesome docker. It's one of the few that's using the most recent version(s) (php + grav).

Cheers,

Hans

Chmod errors on startup because of topic names with spaces

Hello!

In my docker logs I came across errors of the following style:

chmod: cannot access '/var/www/grav/user/pages/08.kochbuch/Das': No such file or directory
chmod: cannot access 'mittelgro'$'\303\237''e': No such file or directory

This error is caused by xargs's interpretation of its command line input:
find /var/www/grav -type f | xargs chmod 664 should be find /var/www/grav -type f | xargs -d '\n' chmod 664, so xargs splits its input at linebreaks and not at spaces.

You can see the difference in the following tests:

$ find /home/mirko/test | xargs ls -lisah
ls: cannot access '/home/mirko/test/Hello': No such file or directory
ls: cannot access 'and': No such file or directory
ls: cannot access 'Welcome': No such file or directory
ls: cannot access '/home/mirko/test/sdf': No such file or directory
ls: cannot access 'sd': No such file or directory
ls: cannot access 'fs': No such file or directory
ls: cannot access 'ds': No such file or directory
ls: cannot access 'ds': No such file or directory
ls: cannot access 'sda': No such file or directory
ls: cannot access 'as': No such file or directory
/home/mirko/test:
total 20K
3801135 4.0K drwxrwxr-x  5 mirko mirko 4.0K Dec 25 13:12  .
3145730 4.0K drwxr-xr-x 62 mirko mirko 4.0K Dec 25 13:11  ..
3801136 4.0K drwxrwxr-x  2 mirko mirko 4.0K Dec 25 13:11 'Hello and Welcome'
3803540 4.0K drwxrwxr-x  2 mirko mirko 4.0K Dec 25 13:12 'sdf  sd fs ds ds sda as'
3801163 4.0K drwxrwxr-x  2 mirko mirko 4.0K Dec 25 13:12  test

/home/mirko/test/test:
total 8.0K
3801163 4.0K drwxrwxr-x 2 mirko mirko 4.0K Dec 25 13:12 .
3801135 4.0K drwxrwxr-x 5 mirko mirko 4.0K Dec 25 13:12 ..
$ find /home/mirko/test | xargs -d '\n' ls -lisah
/home/mirko/test:
total 20K
3801135 4.0K drwxrwxr-x  5 mirko mirko 4.0K Dec 25 13:12  .
3145730 4.0K drwxr-xr-x 62 mirko mirko 4.0K Dec 25 13:11  ..
3801136 4.0K drwxrwxr-x  2 mirko mirko 4.0K Dec 25 13:11 'Hello and Welcome'
3803540 4.0K drwxrwxr-x  2 mirko mirko 4.0K Dec 25 13:12 'sdf  sd fs ds ds sda as'
3801163 4.0K drwxrwxr-x  2 mirko mirko 4.0K Dec 25 13:12  test

'/home/mirko/test/Hello and Welcome':
total 8.0K
3801136 4.0K drwxrwxr-x 2 mirko mirko 4.0K Dec 25 13:11 .
3801135 4.0K drwxrwxr-x 5 mirko mirko 4.0K Dec 25 13:12 ..

'/home/mirko/test/sdf  sd fs ds ds sda as':
total 8.0K
3803540 4.0K drwxrwxr-x 2 mirko mirko 4.0K Dec 25 13:12 .
3801135 4.0K drwxrwxr-x 5 mirko mirko 4.0K Dec 25 13:12 ..

/home/mirko/test/test:
total 8.0K
3801163 4.0K drwxrwxr-x 2 mirko mirko 4.0K Dec 25 13:12 .
3801135 4.0K drwxrwxr-x 5 mirko mirko 4.0K Dec 25 13:12 ..

Best regards,
Miroka

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

This repository currently has no open or pending branches.

Detected dependencies

dockerfile
Dockerfile.gravadmin
Dockerfile.gravcore
github-actions
.github/workflows/build.yml
  • actions/checkout v4
  • hadolint/hadolint-action v3.1.0
  • actions/checkout v4
  • docker/metadata-action v5
  • docker/login-action v3
  • docker/build-push-action v5
  • actions/checkout v4
  • docker/metadata-action v5
  • docker/login-action v3
  • docker/build-push-action v5

  • Check this box to trigger a request for Renovate to run again on this repository

Unrecognized services

I got those errors when running the image.

php8.2-fpm: unrecognized service
nginx: unrecognized service
cron: unrecognized service

Complains of 'mbstring' not loaded.

Hi, I finally got around to testing the new images you made for the path issue I posted but upon using the new images I received an error saying that 'mbstring' was not loaded.

I fixed the issue by installing manually.

su
apt-get update
apt-get install php-mbstring

No sure if you need to check its installed as standard with the images.

Manifest for dsavell/grav:latest not found: manifest unknown

Tried to run your container alongside traefik and stumbled across the following issue:

Error response from daemon: manifest for dsavell/grav:latest not found: manifest unknown: manifest unknown

Since I don't wanna post my whole traefik config, I tried also your command for running the container via CLI. Same error.
The command I run:

docker create \
  --name=grav \
  --restart unless-stopped \
  -e DUID=1000 \
  -e DGID=1000 \
  -p 80:80 \
  -e GRAV_MULTISITE=subdirectory `# optional` \
  -e ROBOTS_DISALLOW=false `# optional` \
  -v /data/containers/grav/backup:/var/www/grav/backup \
  -v /data/containers/grav/logs:/var/www/grav/logs \
  -v /data/containers/grav/user:/var/www/grav/user \
  dsavell/grav:latest

Results in:

Unable to find image 'dsavell/grav:latest' locally
Error response from daemon: manifest for dsavell/grav:latest not found: manifest unknown: manifest unknown

System info

user@host:~/tmp$ docker --version
Docker version 20.10.21, build baeda1f

user@host:~/tmp$ lsb_release -a
No LSB modules are available.
Distributor ID:	Debian
Description:	Debian GNU/Linux 10 (buster)
Release:	10
Codename:	buster

Reading nginx logs

Awesome image, thanks for creating it!

My Unix foo is pretty low and I'm not sure how to access the nginx error and access logs in my containers. Could you explain this? I can see they are symlinked to stderr and stdout but that doesn't help me (aforementioned embarrassing Unix foo). I can comment that part of the Dockerfile out in future containers, too, obviously.

Unable to run any grav command

Issuing any Grav command in the CLI gives me the following error:

bash: bin/grav: No such file or directory

I read somewhere (can't find link now) that it may be due to php not having the correct path????

Container customisation parameters

I've been wanting for a while to be able to pass parameters to docker run or docker-compose that allow me to add PHP libraries (like sqlite) or Grav plugins/themes. Mostly the former.

I guess this is more a docker image modification thing than something that can be added at runtime (container instantiation), but my understanding is limited and my attempts to research it have only added to my confusion. I'm yet to find good online Docker resources that address (what I assume) are common use cases like this.

Is there a way you know of? Otherwise I'm left with running my customisations in the container, or creating private image builds for each configuration I need (again, mostly a problem for PHP library packages).

-v path

Hello and thank you a lot for the job.
I am trying to expose a project by the -v attribute but I get only a blank page, while on the earlier version it worked as a charm. Am I missing something? Thank you

ps. the code I am using is:

docker create --name=test \ 
--restart=always \
-p 80:80 \
-v <path>:/var/www \
dsavell/grav

stderr does not work

I'm not sure what the deal is, but Nginx will not write errors to stderr. stdout works perfect.

If you remove the hard link for stderr and have it write to /var/log/nginx/error.log, this works:

  1. kill all php-fmf kill -9 $(pidof nginx)
  2. make web request, get 503 error.
  3. In /var/log/nginx/error.log:
2021/01/29 18:51:36 [error] 76#76: *6 connect() to unix:/var/run/php/php7.4-fpm.sock failed (111: Connection refused) while connecting to upstream, client: 192.168.193.5, server: f1c8475c86f4, request: "GET /ndksjfds HTTP/1.1", upstream: "fastcgi://unix:/var/run/php/php7.4-fpm.sock:", host: "my_server:7654"

As far as I can tell, it's impossible to make nginx output this to stderr. In the bash init script you can add echo "stderr test" >&2 and it correctly outputs to the docker log.

I would like to submit a [tiny] PR to simplify docker logging a bit, by removing the hard links and having nginx directly write to /dev/stdout. This works, but stderr does not, both using the hard link or having nginx log directly to /dev/stderr results in nothing logged. It appears the best option is to have stderr write to the file, and access go to stdout. This is not ideal, but unless someone can figure this out, the options are:

  1. log stderr (either directly or via a hard link) to docker, which results in all errors being dropped; effectively logging to /dev/null
  2. log stderr to /var/log/nginx/error.log. This is not ideal, but it least the logs are not thrown away.

Any ideas?

Unable to exec bin/grav install on containers, git missing

One of the ways I create reproduceable builds these days is by using a .dependencies file in every Grav repo and running docker exec -u xyz container-name bin/grav install on every instance. Upgrades too.

Just tried this for the first time on a dsavell/grav container and got these errors on plugins that weren't already installed:

sh: 1: git: not found
ERROR cloning https://github.com/JulianSchoenbaechler/grav-plugin-zooming

I checked the Dockerfiles and indeed git is not installed, even in Admin (I thought Admin ran bin/grav install in the background??).

I can work around this of course, but it seems an essential part of container reproduceability and maintenance, and a surprising omission. It's all bloat, but would you consider adding it?

Can’t access admin UI

I’ve installed as per instructions using the admin tag but when I visit http://www.site.com/admin I get a 404 error.

I attempted to install the admin panel via CLI but the commands for installing plugins don’t seem to be working.

What am I doing wrong?

Unable to `su` as user xyz

I can see that this is because useradd uses -s /bin/false. Is there a good reason for this?

The reason I would find it handy is to run bin/gpm as the webserver user to avoid permission problems (which are fixed easily enough, but it's another step).

Recreating container also recreates Home and Typography pages

Hi,

I usually want to be able to delete and recreate containers as necessary... Unfortunately, on every initial start (at least of the init-admin script) a plain installation is copied over the previous data. During this process, some configurations get lost.

I would rather like the script to look for already existing data (without modifying it) and then to perform an update. I am just not completely sure how this could be done. Anyway, maybe someone can find a solution.
Nevertheless, I really like these docker containers!

Best,
Miroka

Can't Install ANY themes and can't install some plugins!!!

I can not install any new themes. I go to the admin area and in the Themes section I click Add and select a theme and click install it will give me an error about something not being writeable, the error appears so quickly I can really see all of it.

The same thing happens with SOME not all but SOME plugins.

Also, may I make a suggestion of adding Nano text editor to the container. It would he a HUGE help, please?

Please help, please????

Problem in Accessing

Hello, I created a container and I used the tag dsavell/grav:latest and it takes me to an already installed Grav site with no way to access the Admin.

So I created a different container and used the tag dsavell/grav:admin And this just takes me to a 403 Forbidden Error fro, Nginx

I am wanting to add a container, and then be able to access the Grav admin so I can set everything up there.
Please help?
Thank You!

Adding an editor

I appreciate you are probably trying to keep this image very minimal. A couple of times, I've found it helpful (if not necessary) to install nano to hack at files outside of the suggested shared volumes. The ones I can think of are in the Grav root - robots.txt and the multisite setup.php file. (Actually a multisite image might be a good variant Dockerfile to add.)

Anyway, just thought you might consider adding vim or nano or whatever to the image :)

Nginx/PHP server name

This seems like a general docker question, but I'm wasting a lot of time and reading a lot of confusing stuff assuming that.

I notice after creating a container using the --hostname foo flag, phpinfo() outputs the name of the server as 'localhost':

$_SERVER['HTTP_HOST']: localhost:2550
$_SERVER['SERVER_NAME']: localhost

By adding 'foo' as an entry against 127.0.0.1 in /etc/hosts, I was able to change the latter value only, and of course I don't want to have to do that.

In container shell, output of hostname is (correctly) 'foo'.

There are a couple of specific reasons I need this in my Grav container:

  • environment configurations, which use directories under /user named after the hostname,
  • generating login activation links for emailing, which of course must be absolute.

I noticed #1 and that /etc/nginx/sites-enabled/default contains the line server_name $hostname;.

Seems I am either getting a docker create flag wrong or the image isn't configuring something it should. Are you able to point me in the right direction?

Unable to upload images

I have created the containe following your instructions. Everything seems to be working except for uploading files. For example, when trying to change the avatar the following error arises:

Unable to upload file photo.jpg: Missing a temporary folder

My docker_compose.yml file is:

version: '3'
services:
  grav:
    restart: always
    image: dsavell/grav:admin
    container_name: grav-website
    ports:
      - 6501:80
    environment:
      - DUID=1026
      - DGID=65126
    volumes:
      - /volume/docker/grav/backup:/var/www/grav/backup
      - /volume/docker/grav/logs:/var/www/grav/logs
      - /volume/docker/grav/user:/var/www/grav/user
      - /volume/docker/grav/tmp:/var/www/grav/tmp

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.