suntorytimed / resourcespace

Docker image for ResourceSpace based on ubuntu:latest including openCV, poppler, php8.1 and php-mysqlnd
European Union Public License 1.2
19 stars 11 forks source link

Updates for the Readme #6

Closed dpeet closed 1 year ago

dpeet commented 1 year ago

Hi @suntorytimed!

I came across resourcespace as a DAM and saw your repo (with 100k+ pull congrats!). While I was able to get things going, I encountered some of the same problems seen in other issues (#4 and #3 specifically). Below are some thoughts that could be incorporated into the readme to help future users!

Looking at your docker-compose.yml as well as this one https://github.com/yakob-aleksandrovich/resourcespace-docker/blob/master/docker-compose.yml I came up with

version: "3.7"

networks:
  frontend:
  backend:

# Trying to use bind volumes directly resulted in a 500 error, but using named volumes worked
volumes:
  mariadb:
  include:
  filestore:

services:
  resourcespace:
    image: suntorytimed/resourcespace:latest
    restart: unless-stopped
    depends_on:
      - mariadb-resourcespace
    volumes:
      - include:/var/www/html/include
      - filestore:/var/www/html/filestore

    networks:
      - frontend
      - backend
    ports:
      - 4080:80  # I changed the external port to 4080 for Caddy, my reverse proxy tool

  mariadb-resourcespace:
      container_name: mariadb-resourcespace
      restart: always
      environment:
          - PUID=1000
          - PGID=1000
          - MYSQL_ROOT_PASSWORD={password}
      volumes:
          - mariadb:/config
      image: lscr.io/linuxserver/mariadb
      networks:
        - backend

# connect to the mariadb container terminal with docker exec -it mariadb-resourcespace bash then run mysql -u root -p and use the root password from earlier.

# CREATE USER 'maria-resourcespace-user' IDENTIFIED by '{password}';
# CREATE DATABASE IF NOT EXISTS resourcespace;
# GRANT ALL PRIVILEGES ON resourcespace.* TO 'maria-resourcespace-user' IDENTIFIED BY '{password}';

in #3 The person didn't have the db.env file. Since I already had a mariadb docker from another project I copied it over, as well as my notes for setting it up.

in #4 you were right that the issue was having an incorrect address for the mariadb database. The trick was to use the name of the container / service - in my case that was mariadb-resourcespace. I put in the maria username and password that I did in bash above, fixed the baseurl for my caddy purposes, and had to remove the /usr/bin from the MySQL binary path line. With all that done I clicked begin installation and was able to start setting resourcespace up!

CleanShot 2023-01-12 at 17 23 35@2x

My Caddyfile was pretty simple, and I didn't run into issues in my limited testing

{
  email myemail@gmail.com
}

resourcespace.mydomain.net {
  reverse_proxy /* localhost:4080 {
  }
}
suntorytimed commented 1 year ago

Sorry, for the late reply and thanks for the input. Very much appreciated! This weekend I will update the README with your input and will also update the Docker Hub page to make it easier to get started with the container. I honestly never expected so many people to use it :sweat_smile: