Bludit and Docker

Post Reply
User avatar
diego
Site Admin
Posts: 773
Joined: Sat May 16, 2015 2:53 pm
Been thanked: 1 time
Contact:

Official Docker container.

Docker hub
https://hub.docker.com/r/bludit/docker/

Run the container

Code: Select all

docker run --name bludit -p 8000:80 -d bludit/docker:latest
Go to http://localhost:8000 to continue with the installation
puschmie
Ssr. Bludit
Posts: 10
Joined: Thu Oct 29, 2020 12:12 pm
Location: Vienna
Contact:

I've run into a slight problem with this image and can't figure out what is causing it.
The container is created just fine, I can access the website, all the content and the admin panel. But I can't save new content. Whenever I hit save it's gone. I suspect it has something todo with volume permissions, but I've already set them correctly to my knowledge.
This is the relevant ouput from docker-compose logs

Code: Select all

bludit    | 2021/01/30 11:54:49 [error] 12#0: *42 FastCGI sent in stderr: "PHP message: PHP Warning:  mkdir(): Permission denied in /usr/share/nginx/html/bl-kernel/helpers/filesystem.class.php on line 56
bludit    | PHP message: [ERROR] [3.13.1] [/admin/new-content] Pages::add | Error occurred when trying to create the directory [/usr/share/nginx/html/bl-content/pages/events]
bludit    | PHP message: [ERROR] [3.13.1] [/admin/new-content] Function createNewPage() | Error occurred when trying to create the page
bludit    | PHP message: [ERROR] [3.13.1] [/admin/new-content] Function createNewPage() | Cleaning database...
bludit    | PHP message: [ERROR] [3.13.1] [/admin/new-content] Function createNewPage() | Cleaning finished" while reading response header from upstream, client: 172.21.0.1, server: , request: "POST /admin/new-content HTTP/1.1", upstream: "fastcgi://unix:/var/run/php-fpm.sock:", host: "derknoten.wien", referrer: "https://derknoten.wien/admin/new-content"
Does anyone have any idea what's going on here?
I've created the container through docker-compose since it needs to run with some other services. I've also mounted bl-themes and bl-plugin volumes through docker-compose since I need to be able to access those directories. Could that have something todo with it?
Thanks for your help!
User avatar
jlandt
Master Bludit
Posts: 73
Joined: Mon Feb 22, 2021 10:56 am
Location: Berlin
Has thanked: 2 times
Been thanked: 10 times
Contact:

NGINX permission problems?! ... :?

Alternative ...

Code: Select all


version: "3"

services:

  bludit-apache:
    container_name: bludit-apache
    restart: unless-stopped
    user: 1000:1000
    hostname: localhost
    build:
      context: docker
      dockerfile: Dockerfile
    volumes:
      - ./www:/var/www/html:rw
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
      - ./docker/php.ini:/usr/local/etc/php/conf.d/zz-custom.ini
    ports:
      - 8082:80
... Dockerfile in docker sub dir:

Code: Select all

FROM php:8-apache

RUN apt-get update \
 && apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng-dev

RUN docker-php-ext-configure gd
RUN docker-php-ext-install gd

RUN a2enmod rewrite

WORKDIR /var/www/html
- create www directory
- docker-compose up -d
- download and extract Bludit in www dir
- optional: extend your Dockerfile with add/copy www/* for usage without mount
Gruss, Jürgen
Post Reply