Git Product home page Git Product logo

docker-spotweb's People

Contributors

d3-bug avatar gitbulb avatar hornygeek avatar jamesstout avatar jgeusebroek avatar jimmycleuren avatar mattie112 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

docker-spotweb's Issues

Using media branch

The media branch is terrible behind the non media master branch and is missing many essential updates.
It also is not maintained any more.

Using a spotweb database with no password prevents most of dbsettings.inc.php from being written

Such an empty password value causes this line at the start of the block line 13 of entrypoint.sh to not execute the lines that would write out the env vars to the dbsettings.inc.php file. Only the port (when set as an env var on the docker command) is written.

if [[ -n "$SPOTWEB_DB_TYPE" && -n "$SPOTWEB_DB_HOST" && -n "$SPOTWEB_DB_NAME" && -n "$SPOTWEB_DB_USER" && -n "$SPOTWEB_DB_PASS" ]]; then

I had to set a dummy password on the docker command, and then edit the file in my mapped volume to set the pass to the empty string.

I'm the only user of my spotweb instance, and only use it on my local network, so I'm not concerned about the open DB in my particular use case.

Cannot connect to database witk mapped docker-compose

Having exactly the same issues as refered to in this thread https://githubmemory.com/repo/jgeusebroek/docker-spotweb/issues/23

Can solve this with the solution in thread, copying mapped dbsettings file into docker file and disabling mapped volume. But this is no persistent solution, because it is lost when recreating or restarting the dockerfile.

This is the docker-compose I am using:

spotweb:
image: jgeusebroek/spotweb:latest
container_name: spotweb
restart: unless-stopped
networks:
- t2_proxy
- default
security_opt:
- no-new-privileges:true

#ports:

#- "$SPOTWEB_PORT:88"

volumes:
 - $DOCKERDIR/appdata/spotweb:/config
environment:
  PUID: $PUID
  PGID: $PGID
  TZ: $TZ
  SPOTWEB_DB_HOST: $MARIADB_HOST
  SPOTWEB_DB_PORT: $MARIADB_PORT
  SPOTWEB_DB_NAME: spotweb
  SPOTWEB_DB_USER: $SPOTWEB_DB_USER
  SPOTWEB_DB_PASS: $SPOTWEB_DB_PASS
  SPOTWEB_CRON_RETRIEVE: $SPOTWEB_CRON_RETRIEVE
labels:
  - "traefik.enable=true"

#HTTP Routers

  - "traefik.http.routers.spotweb-rtr.entrypoints=https"
  - "traefik.http.routers.spotweb-rtr.rule=Host(`spotweb.$DOMAINNAME0`)"

#Middlewares

  - "traefik.http.routers.spotweb-rtr.middlewares=chain-no-auth@file"

#HTTP Services

  - "traefik.http.routers.spotweb-rtr.service=spotweb-svc"
  - "traefik.http.services.spotweb-svc.loadbalancer.server.port=80"

Docker instance updated and gave 'Spotweb contains updated global settings settings. Please run 'bin/upgrade-db.php' from a console window '

When I run the command I get the following:

bin/upgrade-db.php
Updating schema..(pdo_mysql)
	Validating spots(messageid)
	Validating spots(poster)
	Validating spots(title)
	Validating spots(tag)
	Validating spots(category)
	Validating spots(subcata)
	Validating spots(subcatb)
	Validating spots(subcatc)
	Validating spots(subcatd)
	Validating spots(subcatz)
	Validating spots(stamp)
	Validating spots(reversestamp)
	Validating spots(filesize)
	Validating spots(moderated)
	Validating spots(commentcount)
	Validating spots(spotrating)
	Validating spots(reportcount)
	Validating spots(spotterid)
	Validating spots(editstamp)
	Validating spots(editor)
	Validating spotsfull(messageid)
	Validating spotsfull(verified)
	Validating spotsfull(usersignature)
	Validating spotsfull(userkey)
	Validating spotsfull(xmlsignature)
	Validating spotsfull(fullxml)


SpotWeb crashed

Database schema or settings upgrade failed:
   Invalid collation setting for varchar: utf8mb3_general_ci


#0 /var/www/spotweb/lib/dbstruct/SpotStruct_abs.php(200): SpotStruct_mysql->getColumnInfo()
#1 /var/www/spotweb/lib/dbstruct/SpotStruct_abs.php(182): SpotStruct_abs->compareColumn()
#2 /var/www/spotweb/lib/dbstruct/SpotStruct_abs.php(412): SpotStruct_abs->validateColumn()
#3 /var/www/spotweb/lib/services/Upgrade/Services_Upgrade_Base.php(56): SpotStruct_abs->updateSchema()
#4 /var/www/spotweb/bin/upgrade-db.php(55): Services_Upgrade_Base->database()

What do I need to fix? Nothing else changed...

Select branch for spotweb

A request for an enhancement :
It would be nice if there comes some parameter to determine the branch to checkout.
Default should be master, but other branches should be possible (like develop).
This would also greatly help our team in testing issue's and solutions.

SSL operation failed with code 1

Having trouble connection to Eweka using SSL. I can not retrieve spots and see this output in the terminal:

PHP Warning: stream_socket_client(): SSL operation failed with code 1. OpenSSL Error messages:
error:1416F086:SSL routines:tls_process_server_certificate:certificate verify failed in /var/www/spotweb/vendor/spotweb/nntp/src/Protocol/Client.php on line 729

PHP 8 error while using latest docker build

Hi,

I upgraded to the the latest docker image which worked fine in the past but now i get this error message on the main page:

Deprecated: Function libxml_disable_entity_loader() is deprecated in /var/www/spotweb/lib/Bootstrap.php on line 82

when clicking mark everything as read:

Deprecated: Function libxml_disable_entity_loader() is deprecated in /var/www/spotweb/lib/Bootstrap.php on line 82
{"result":"success","data":[],"info":[],"warnings":[],"errors":[]}

can you look into the code?

Can't connect (and retrieve) to eweka newsserver

I installed spotweb through docker compose. During installation i choose Eweka as a newsserver. With my credentials i couldn't get the verification to work so i skipped it. After installation i went into the settings and added the eweka settings manually.
I tried:

news.eweka.nl / no encryption / port 110
ssl.eweka.nl / enabled encryption / port 443
ssl.eweka.nl / enabled encryption / port 563

None of them was able to retrieve posts.
When i check the log i see the following line:

PHP Warning: stream_socket_client(): Unable to connect to ssl://sslreader.eweka.nl:563 (php_network_getaddresses: getaddrinfo for sslreader.eweka.nl failed: Temporary failure in name resolution) in /var/www/spotweb/vendor/spotweb/nntp/src/Protocol/Client.php on line 729

I know my credentials are right because i copy pasted them right from my password manager + the ssl one on port 563 is working within nzbget.

Cronjobs don't get added on container creation

For some reason even after adding SPOTWEB_CRON_RETRIEVE='*/15 * * * *' to the environment, the crontab for all users is still empty after the container spins up. This leads to the container not actually retreiving spots.

Needs another update after installation

Notice: Undefined index: xsrfsecret in /var/www/spotweb/lib/services/Settings/Services_Settings_Container.php on line 62

Notice: Undefined index: settingsversion in /var/www/spotweb/lib/services/Settings/Services_Settings_Container.php on line 62
Spotweb contains updated global settings settings. Please run 'bin/upgrade-db.php' from a console window

It was solved after running the upgrade script, would be nice if this was done automatically.

Make Spotweb updates possible

Is there any way to implement a way of updating Spotweb ? Now we have to wait for either a new image, build the image from the dockerfile or do some git voodoo to update the Spotweb install. For example, is it possible to leave the .git file in the install so we can git pull ? Or is there a specific reason for remving it ?

The reason I ask is because there is a 'serious' issue in the currently packaged version of Spotweb (Merge pull request #410) that is making Spotweb rather useless for searches by IMDB Id. And of course making the changes manually is possible but that makes rebuilding docker stacks and such kinda difficult.

Change port 81 on docker container

Hi there,

It seems like port 81 is hardcoded in either Apache config or Spotweb itself.
Would it be possible to add a environment to support using a different port?

Next to this, PUID and GUID isn't being used. When using the volume, user 33 is set instead of the one added in the environment.

Thanks.

Cheers,

Temporary failure in name resolution

Probably a fault of my own, but maybe someone can help me out.

I moved server to different location. Changed hostname of host computer. Changed DNS servers of hosts.
Now I get the following message when downloading a spot:

stream_socket_client(): unable to connect to ssl://news.eweka.nl:563 (php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution

AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.23.0.2. Set the 'ServerName' directive globally to suppress this message

What I tried:

  • Changing hostname back to original
  • Removing container and files and start all over
  • Logging in to the container and cat /etc/resolv.conf: nameserver 127.0.0.11 (I think that is revering to dockers dns, so good?)
  • All other docker containers work properly

I use pihole as DNS and Pfsense as router.

docker pull arm64 image gives php error

Hi,

Thanks for your containers. But latest images for arm pulled (either armv7/armv8/arm64) architecture give error: "/var/www/spotweb/vendor/bin/phpunit: file name too long"
The amd64 version error pulls ok...

So I guess this must be arm specific. Just a wild guess: maybe on build for arm missing -no-dev ([spotweb issue #](error: failed to symlink 'vendor/bin/phpunit': File name too long #749)?

Would really like to continue using your container but on a arm sbc...
Could you take a look?

docker.io/jgeusebroek/spotweb@sha256:9d0d53f326fca428eab0577412669a71bad64914e8754dea41d4671ece4591bd: Pulling from jgeusebroek/spotweb
cfbc8b467b3e: Pull complete
2044959967d2: Pull complete
c572e3b3e330: Extracting [==================================================>]  11.73MB/11.73MB
738eaf8efc38: Download complete
6b1ab3816dfa: Download complete
ab8b5b98b0c6: Download complete
3e93e4abe3e1: Download complete
0b4bf5045edd: Download complete
1256f34c18ff: Download complete
failed to register layer: Error processing tar file(exit status 1): symlink #!/usr/bin/env php
<?php

/**
 * Proxy PHP file generated by Composer
 *
 * This file includes the referenced bin path (../phpunit/phpunit/phpunit)
 * using a stream wrapper to prevent the shebang from being output on PHP<8
 *
 * @generated
 */

namespace Composer;

$GLOBALS['_composer_bin_dir'] = __DIR__;
$GLOBALS['_composer_autoload_path'] = __DIR__ . '/..'.'/autoload.php';
$GLOBALS['__PHPUNIT_ISOLATION_EXCLUDE_LIST'] = $GLOBALS['__PHPUNIT_ISOLATION_BLACKLIST'] = array(realpath(__DIR__ . '/..'.'/phpunit/phpunit/phpunit'));

if (PHP_VERSION_ID < 80000) {
    if (!class_exists('Composer\BinProxyWrapper')) {
        /**
         * @internal
         */
        final class BinProxyWrapper
        {
            private $handle;
            private $position;
            private $realpath;

            public function stream_open($path, $mode, $options, &$opened_path)
            {
                // get rid of phpvfscomposer:// prefix for __FILE__ & __DIR__ resolution
                $opened_path = substr($path, 17);
                $this->realpath = realpath($opened_path) ?: $opened_path;
                $opened_path = 'phpvfscomposer://'.$this->realpath;
                $this->handle = fopen($this->realpath, $mode);
                $this->position = 0;

                return (bool) $this->handle;
            }

            public function stream_read($count)
            {
                $data = fread($this->handle, $count);

                if ($this->position === 0) {
                    $data = preg_replace('{^#!.*\r?\n}', '', $data);
                }
                $data = str_replace('__DIR__', var_export(dirname($this->realpath), true), $data);
                $data = str_replace('__FILE__', var_export($this->realpath, true), $data);

                $this->position += strlen($data);

                return $data;
            }

            public function stream_cast($castAs)
            {
                return $this->handle;
            }

            public function stream_close()
            {
                fclose($this->handle);
            }

            public function stream_lock($operation)
            {
                return $operation ? flock($this->handle, $operation) : true;
            }

            public function stream_seek($offset, $whence)
            {
                if (0 === fseek($this->handle, $offset, $whence)) {
                    $this->position = ftell($this->handle);
                    return true;
                }

                return false;
            }

            public function stream_tell()
            {
                return $this->position;
            }

            public function stream_eof()
            {
                return feof($this->handle);
            }

            public function stream_stat()
            {
                return array();
            }

            public function stream_set_option($option, $arg1, $arg2)
            {
                return true;
            }

            public function url_stat($path, $flags)
            {
                $path = substr($path, 17);
                if (file_exists($path)) {
                    return stat($path);
                }

                return false;
            }
        }
    }

    if (function_exists('stream_wrapper_register') && stream_wrapper_register('phpvfscomposer', 'Composer\BinProxyWrapper')) {
        include("phpvfscomposer://" . __DIR__ . '/..'.'/phpunit/phpunit/phpunit');
        exit(0);
    }
}

include __DIR__ . '/..'.'/phpunit/phpunit/phpunit';
 /var/www/spotweb/vendor/bin/phpunit: file name too long

Include postgresql driver

SPOTWEB_DB_TYPE=pdo_pgsql

Gives:
Unable to connect to database:
could not find driver

Could the postgres driver be included?

No images and site looks weird

Hi,

First of all thanks for this docker image. I had some trouble setting it up but now it works and I can add it to Prowlarr with the API key.
The whole docker is behind Traefik.
But somehow my whole website looks like this:

image

I deleted cache, tried diff PC / browser.

I can change settings, but when I save I get this error.

image

Could you give me a hand in the right direction? Thanks !

UPDATE: The site looks normal if I force http instead of https.. hmm

SQLSTATE[HY000] [2002] Connection timed out/ during install page 2

Hello, I have tried installing using different methods.
I always seem to get
SQLSTATE[HY000] [2002] Connection timed out

on
/install.php?page=2

I am on a synology dsm 920+ 7.0.1-42218 Update 3

This is the first guide that I followed, then I uninstalled and tried using the method described here where I run the docker command directly

tried this first
https://drfrankenstein.co.uk/2022/02/03/spotweb-in-docker-on-synology-nas-coming-soon/

then the 2 step from this wiki

I am able to connect to the mariadb with other db tools, like phpmyadmin.

Mariadb version
1:10.7.3+maria~focal

How can I troubleshoot this?

If I mount a directory
docker/spotweb /config

an empty
ownsettings.php file is created, its size is 0

Thanks in advance

Docker-compose Table 'spotweb.settings' doesn't exist #809

I'm trying to deploy using the Docker-compose method. The install looks OK but there is some issue with accessing tables in the sql db

To Reproduce
Use Docker-compose to deploy, run through install and try access the root site

SpotWeb v0.68.34.34 on PHP v8.1.16 crashed object(SqlErrorException)spotweb/spotweb#14 (7) { ["message":protected]=> string(51) "42S02: 1146: Table 'spotweb.settings' doesn't exist" ["string":"Exception":private]=> string(0) "" ["code":protected]=> int(-1) ["file":protected]=> string(40) "/var/www/spotweb/lib/dbeng/dbeng_pdo.php" ["line":protected]=> int(70) ["trace":"Exception":private]=> array(6) { [0]=> array(5) { ["file"]=> string(40) "/var/www/spotweb/lib/dbeng/dbeng_pdo.php" ["line"]=> int(186) ["function"]=> string(4) "exec" ["class"]=> string(9) "dbeng_pdo" ["type"]=> string(2) "->" } [1]=> array(5) { ["file"]=> string(50) "/var/www/spotweb/lib/dao/Base/Dao_Base_Setting.php" ["line"]=> int(25) ["function"]=> string(10) "arrayQuery" ["class"]=> string(9) "dbeng_pdo" ["type"]=> string(2) "->" } [2]=> array(5) { ["file"]=> string(72) "/var/www/spotweb/lib/services/Settings/Services_Settings_DbContainer.php" ["line"]=> int(29) ["function"]=> string(14) "getAllSettings" ["class"]=> string(16) "Dao_Base_Setting" ["type"]=> string(2) "->" } [3]=> array(5) { ["file"]=> string(34) "/var/www/spotweb/lib/Bootstrap.php" ["line"]=> int(217) ["function"]=> string(10) "initialize" ["class"]=> string(29) "Services_Settings_DbContainer" ["type"]=> string(2) "->" } [4]=> array(5) { ["file"]=> string(34) "/var/www/spotweb/lib/Bootstrap.php" ["line"]=> int(43) ["function"]=> string(11) "getSettings" ["class"]=> string(9) "Bootstrap" ["type"]=> string(2) "->" } [5]=> array(5) { ["file"]=> string(26) "/var/www/spotweb/index.php" ["line"]=> int(19) ["function"]=> string(4) "boot" ["class"]=> string(9) "Bootstrap" ["type"]=> string(2) "->" } } ["previous":"Exception":private]=> NULL } 42S02: 1146: Table 'spotweb.settings' doesn't exist

Add environment variable for base href

I'm running spotweb behind a reverse proxy that serves it through TLS/SSL. It doesn't figure that out so css/js is broken. Would be nice if the URL could be set through an env variable. :)

Crontab not running?

I have set the crontab option using the "SPOTWEB_CRON_RETRIEVE" variable. When I check /etc/crontab I see it's there:

*/15 * * * * su -l www-data -s /usr/bin/php /var/www/spotweb/retrieve.php >/var/log/stdout 2>&1

However, it seems like it's never being started. Not sure why. The command itself does work, when I execute it in the terminal of the container. The spots however, don't update.

Unsuccessful install

Hi,

I'm trying to get spotweb running but I encounter a problem I fail to solve...

My docker-compose looks like this:

version: '3.3'
services:
    spotweb:
        restart: always
        ports:
            - 9099:80
        container_name: spotweb
        volumes:
            - /data/docker/spotweb:/config
        environment:
            - TZ=Europe/Amsterdam
            - SPOTWEB_DB_TYPE=pdo_mysql
            - SPOTWEB_DB_HOST=my.databaseserver.name
            - SPOTWEB_DB_PORT=8077
            - SPOTWEB_DB_NAME=spotweb
            - SPOTWEB_DB_USER=spotweb
            - SPOTWEB_DB_PASS=my_secret_password
            - SPOTWEB_CRON_RETRIEVE=*/15 * * * *
        image: jgeusebroek/spotweb

After deploying this stack (is running),

Creating database configuration

rm: cannot remove '/var/www/spotweb/dbsettings.inc.php': No such file or directory

Setting (PHP) time zone to Europe/Amsterdam


sed: can't read /etc/php/7.*/*/php.ini: No such file or directory

 * Starting periodic command scheduler cron

   ...done.

I delete the file /data/docker/spotweb/dbsettings.inc.php as I read in the docs on https://github.com/edv/docker-spotweb

Then I start my browser at my.databaseserver.name:9099/install.php and I get the message:

This site is not reachable
ERR_CONNECTION_REFUSED

My db server is a mariadb instance.
I have tried this now about 10 times, but cannot seem to solve this issue...
I am stuck.

15 minutes later 2 additional lines in the log:

Unable to connect to database: No database settings have been entered, please use the 'install.php' wizard to install and configure Spotweb.
If you are upgrading from an earlier version of Spotweb, please consult https://github.com/spotweb/spotweb/wiki/Frequently-asked-questions/ first

Geen afbeeldingen

Hallo,

Ik heb docker draaien met jullie image op een Synology. Op zich werkt e.e.a. prima. Alleen krijg ik geen afbeeldingen te zien bij de spots. Ik heb daar wel op gegoogled en kom wat zaken tegen, zoals dit:

http://www.synology-forum.nl/spotweb/na-upgrade-naar-dsm-5-haalt-spotweb-geen-plaatjes-meer-op/

Als dit al de oplossing is voor mijn Docker installatie, dan zou ik niet weten hoe ik dit zou moeten doen binnen Docker. Kunnen jullie me hiermee helpen? Want ik neem aan dat dit dan zal moeten worden opgelost met environmental variables.

Chowning of the spotweb folder

Hi there, i am in the middle of jumping over to this image since i have a very old one that is pretty much broken.

So far its been running for 15 minutes and it has not finished the chown on the spotweb folder. Mostly because i have my cache folder mounted on the filesystem. That folder is 6.5gb and has a ton of folders too. At some point keeping the cache sounded like a good idea but now it leaves me with 2 questions.

  • do i really need to keep the cache folder? After all, its only for an image of a post right?
  • and if its handy to have, is there something we can do with the chown?

I don't think there is an option inside docker to detect if a folder is mounted from outside, that way we could ignore it. What are your thoughts?

Eweka cannot connect - Temporary failure in name resolution

I do not succeed to connect to Eweka.
Docker is running on QNAP via container station using the provided docker-compose file. It used to work but after a reinstall due to a mariadb crash, I can't get the eweka connection up anymore

The error I get is:
Retrieving new Spots from server news.eweka.nl... PHP Warning: stream_socket_client(): php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution in /var/www/spotweb/vendor/spotweb/nntp/src/Protocol/Client.php on line 729 PHP Warning: stream_socket_client(): Unable to connect to ssl://news.eweka.nl:563 (php_network_getaddresses: getaddrinfo failed: Temporary failure in name resolution) in /var/www/spotweb/vendor/spotweb/nntp/src/Protocol/Client.php on line 729 SpotWeb v0.68.34.34 on PHP v8.0.27 crashed

How to resolve?

Unable to get this to work with docker-compose on a Synology nas

My docker-compose file:

  spotweb:
    image: jgeusebroek/spotweb
    container_name: spotweb
    restart: unless-stopped
    environment:
     - PUID=1026
     - GUID=100
     - TZ=Europe/Amsterdam
     - SPOTWEB_DB_TYPE=pdo_mysql
     - SPOTWEB_DB_HOST=spotweb_db
     - SPOTWEB_DB_PORT=3306
     - SPOTWEB_DB_NAME=spotweb
     - SPOTWEB_DB_USER=spotweb
     - SPOTWEB_DB_PASS=spotweb
     - "SPOTWEB_CRON_RETRIEVE=* */2 * * *"
    depends_on:
     - spotweb_db
    ports:
     - 81:80
    volumes:
     - /volume1/apps/spotweb:/config
    network_mode: "service:gluetun"

  spotweb_db:
    image: linuxserver/mariadb
    container_name: spotwebdb
    restart: unless-stopped
    environment:
     - PUID=1026
     - PGID=1000
     - MYSQL_ROOT_PASSWORD=xxxx
     - TZ=Europe/Amsterdam
     - MYSQL_DATABASE=spotweb
     - MYSQL_USER=spotweb
     - MYSQL_PASSWORD=spotweb
    volumes:
     - /volume1/apps/mariadb:/config
    ports:
     - 3306:3306

In the log:
rm: cannot remove '/var/www/spotweb/dbsettings.inc.php': No such file or directory

When restarting the container:

Unable to connect to database:
No database settings have been entered, please use the 'install.php' wizard to install and configure Spotweb.

Schermafbeelding 2023-03-18 om 11 00 35

It seems I'm not the only one when I read the issues. Unfortunately I did not find a solution because I don't have the knowledge to fix it myself...

Watchtower issue

I keep getting watchtower errors while trying to pull your repo:

Could not do a head request for "jgeusebroek/spotweb:latest", falling back to regular pull.
Reason: registry responded to head request with "404 Not Found", auth: "not present"

I read somewhere that it has something to do with buildx that they are adding provenance information in manifests per default now.
https://github.com/docker/buildx/releases/tag/v0.10.0

Hopefully you can look into this, thanks in advance.

cronjob issue

I'm trying to set up a job but apparently I'm doing something wrong you can help me don't get it

[~] # docker run -d --name=spotwebretrieve --rm -p 80:80 -e TZ='Europe/Amsterdam' -e SPOTWEB_CRON_RETRIEVE='*/15 * * * *' jgeusebroek/spotweb
1768c2512172578592b6817a06b3e5e16d91181cbb3df513fa4579087296f233
docker: Error response from daemon: driver failed programming external connectivity on endpoint spotwebretrieve (93d5e4ebbd320208d8c3fad994969784881dd6d511ee751375ee7c1fb68d8848): listen tcp 0.0.0.0:80: bind: address already in use.

admin

Hi Jeroen,

Maybe i'm overseeing something but how do I get a admin user to configure stuff in Spotweb? When I create a user in de main screen it will be a regular user.

Thanks in advance.

Maikel

Environment variable to clear cache on start

Is it possible for you to add a boolean environment variable that execute the following command on startup:

root@spotweb:/var/www/spotweb/bin# php upgrade-db.php --clear-cache -yes

Cache directory not writable

Dear Jeroen,

I noticed when running your Spotweb-docker (thanks for that, btw!) that the cache-directory is not writable for me.

I fixed it by changing the permissions of /var/www/spotweb/cache to 777 ; but I need to fix it manually everytime you push an update to your docker. Is there a possibility you set it correctly ? Most likely you set the permissions to a userID which is available on your host which isn't on mine, but I did not investigate any further.

edit: to clarify, I did docker exec -it CONTAINER_ID /bin/bash on my host, followed by a chmod -R 777 /var/www/html/spotweb

In your entrypoint.sh the problem is caused by line 11:
chown -R www-data:www-data /var/www/spotweb

Couldn't connect to database

Hello Jeroen,

Since a couple of days my Spotweb container isn't able to connect to Mariadb. Both containers run on my Synology NAS.

Mariadb has it's port exposed to 6020 and accepts connections from different client computers using the following command:

telnet 192.168.2.10 6020

However when using Spotweb install.php and/or directly the db config with 192.168.2.10:6020 as database server a connection time out occurs.

If checked from with in the spotweb container and checked the /etc/resolve.config to make sure the dns server has been set, which is. Also tried to do a ping / telnet to the db server and google, but these didn't work since these tools are not installed. Also I wasn't able to install them using apt-get because apt-get couldn't resolve its servers.

Do you have any idea to fix this? .. I seems the container doesn't have network connection to the "out-side" world.

Regards,
Raymond

Language only English?

Is it my installation or is there something wrong?
Despite selecting Dutch as language everything shows in English...

Unable to use with sonarr or nzbhydra

Hi I'm using this docker container on my unraid server but when i want to use it with sonarr or nzbhydra2 it gives an error like this.

Error message from sonarr:

http://192.168.2.80:580/api?t=tvsearch&cat=5030,5040&extended=1&apikey=(removed)&offset=0&limit=100&tvmazeid=36471&season=1&ep=1: On TVSearch no q, tvmaze or rid parameter present

I have found a thread on the spot web github:
spotweb/spotweb#367

is there a way to fix this?

Unable to connect to database

I'm running the docker image on Synology. I stopped the package and after this, spotweb didn't work anymore.

I re-created the containers with docker-compose:

version: "2.1"
services:
  spotweb:
    image: jgeusebroek/spotweb
    container_name: spotweb
    restart: unless-stopped
    environment:
     - PUID=1026
     - PGID=101
     - TZ=Europe/Amsterdam
     - SPOTWEB_DB_TYPE=pdo_mysql
     - SPOTWEB_DB_HOST=spotweb-db
     - SPOTWEB_DB_PORT=3306
     - SPOTWEB_DB_NAME=spotweb
     - SPOTWEB_DB_USER=spotweb
     - SPOTWEB_DB_PASS=spotweb
     - "SPOTWEB_CRON_RETRIEVE=* */480 * * *"
    depends_on:
     - spotweb_db
    ports:
     - 8082:80
    volumes:
     - /volume1/docker/spotweb/config:/config

  spotweb_db:
    image: linuxserver/mariadb
    container_name: spotweb-db
    restart: unless-stopped
    environment:
     - PUID=1026
     - PGID=101
     - MYSQL_ROOT_PASSWORD=mysqlrootpassword
     - TZ=Europe/Amsterdam
     - MYSQL_DATABASE=spotweb
     - MYSQL_USER=spotweb
     - MYSQL_PASSWORD=spotweb
    volumes:
     - /volume1/docker/spotweb/mariadb:/config
    ports:
     - 3306:3306

This gives the following error message when trying to connect to spotweb on port 8082:

Unable to connect to database:
SQLSTATE[HY000] [2002] Connection timed out

Please make sure your database server is up and running and your connection parameters are set

When changing SPOTWEB_DB_HOST to 192.168.2.201 (host ip) or 172.18.0.2 (docker ip) the same message is displayed.

Changing to localhost results in:

Unable to connect to database:
SQLSTATE[HY000] [2002] Cannot assign requested address

Please make sure your database server is up and running and your connection parameters are set

Changing to 127.0.0.1 results in:

Unable to connect to database:
SQLSTATE[HY000] [2002] Connection refused

Please make sure your database server is up and running and your connection parameters are set

It doesn't matter if I run the install.php script or change it in dbsettings.inc.php directly.

I tried to connect to mysql in the mariadb container with spotweb@spotweb, that works. So password shouldn't be the issue...

I remember having this issue on initial setup as well. At that time, it seemed it randomly accepted 172.18.0.2 at the 100th try, but I still don't know why or how...

Any ideas?

DB upgrade issue with latest Docker update?

Hi Jeroen,
I've been a happy user of your Spotweb image for quite some time now, thanks for your efforts!
Until the day before yesterday, I succesfully used it. Yesterday I received an update (triggered by Watchtower).
Today I see this message:
Spotweb contains updated global settings settings. Please run 'bin/upgrade-db.php' from a console window
So I opened a shell through Portainer, started the upgrade-db.php, then I read the following:

root@spotweb:/var/www/spotweb/bin# php upgrade-db.php
Updating schema..(pdo_mysql)
        Validating spots(messageid)
        Validating spots(poster)


SpotWeb crashed

Database schema or settings upgrade failed:
   Invalid collation setting for varchar: utf8mb3_unicode_ci


#0 /var/www/spotweb/lib/dbstruct/SpotStruct_abs.php(200): SpotStruct_mysql->getColumnInfo()
#1 /var/www/spotweb/lib/dbstruct/SpotStruct_abs.php(182): SpotStruct_abs->compareColumn()
#2 /var/www/spotweb/lib/dbstruct/SpotStruct_abs.php(381): SpotStruct_abs->validateColumn()
#3 /var/www/spotweb/lib/services/Upgrade/Services_Upgrade_Base.php(56): SpotStruct_abs->updateSchema()
#4 /var/www/spotweb/bin/upgrade-db.php(55): Services_Upgrade_Base->database()
#5 {main}root@spotweb:/var/www/spotweb/bin# 
  • Do you see the same behaviour?
  • Do you have a recommendation to fix this, or should I try to a fresh install?

Apply hardening to Apache webserver

As can be seen in this issue, I've found a XSS in the spotweb application:
spotweb/spotweb#718

Also I found a couple of other security issues related to the used Apache webserver of this docker, I assume that this has nothing to do with the core application, but with how this docker has been configured.

My advice is to harden the used Apache server (configuration):

  • Remove version information.
  • Do not allow directory listings.
  • Add the X-Frame-Options or Content-Security-Policy security header.
  • Remove .git file from root webfolder.

http hardcoded verwijzigingen

Hi ik heb spotweb draaiend maar krijg een website te zien zonder opmaak (zie screenshot). maar kan bepaalde dingen ook niet doen, zoals inloggen.
als ik naar de achterkant kijk (in de browser, rechtermuisklik en dan inspecteren) zie ik allerlei http foutmeldingen.
kan het zijn dat je hardcoded http verwijzingen in je code maakt?
met mijn reserved proxy probeer ik alle http requests te redirecten naar https maar de foutmeldingen blijven helaas.

is dit iets je kan oplossen?
wellicht is er een mogelijkheid dat je https kan aanklikken tijdens de install.php?

image

Mixed Content: The page at 'https://spotweb.mijnwebsite.com/' was loaded over HTTPS, but requested an insecure stylesheet 'http://spotweb.mijnwebsite.com/?page=statics&type=css&mod=1637407713'. This request has been blocked; the content must be served over HTTPS.

spotweb.mijnwebsite.com/:40 Mixed Content: The page at 'https://spotweb.mijnwebsite.com/' was loaded over a secure connection, but contains a form that targets an insecure endpoint 'http://spotweb.mijnwebsite.com/?'. This endpoint should be made available over a secure connection.

spotweb.mijnwebsite.com/:1 Mixed Content: The page at 'https://spotweb.mijnwebsite.com/' was loaded over HTTPS, but requested an insecure script 'http://spotweb.mijnwebsite.com/?page=statics&type=js&lang=en_US&mod=1637407713'. This request has been blocked; the content must be served over HTTPS.
(index):249 Uncaught ReferenceError: initSpotwebJs is not defined
    at (index):249
(anoniem) @ (index):249

spotweb.mijnwebsite.com/:1 Mixed Content: The page at 'https://spotweb.mijnwebsite.com/' was loaded over HTTPS, but requested an insecure favicon 'http://spotweb.mijnwebsite.com/?page=statics&type=ico&mod=1637407713'. This request has been blocked; the content must be served over HTTPS.

Using spotweb behind a vpn

Hi all,

I have been looking for an answer and tried so many things already so I thought to ask it here. It is not a bug but a request for information.

I have a vpn container to nordpvn (bubuntux). I would like to connect spotweb via that VPN to the outside world. So first I changed the ports. SO defaulting to 8080 in stead of port 8080 by changing

  • 000-default.conf
  • ports.conf
    and mount these files. This works when I run it without VPN.

yaml example:
spotweb:
image: jgeusebroek/spotweb
user: '0'
container_name: spotweb
network_mode: host
env_file:
- spotweb.env
volumes:
- ~/container/apps/spotweb/data:/config
- ~/container/apps/spotweb/data/ports.conf:/etc/apache2/ports.conf
- ~/container/apps/spotweb/data/000-default.conf:/etc/apache2/sites-enabled/000-default.conf
ports:
- 8080:8080
(commented) network_mode: service:vpn
restart: unless-stopped

However when I uncomment network mode:service:vpn,comment the ports and network mode: host, it is not reachable. VPN works with other services like SONARR / RADARR etc, and I can go to the url...

To sum up:
Separate VPN works
Other services via the same VPN container also work (e.g. sonarr 10.1.0.100:8989 is reachable)
Separate spotweb works (e.g. 10.1.0.100:8080)
Combine Spotweb via that VPN does not work (e.g. 10.1.0.100:8080)

Does someone have experience with this and point me in the correct direction:

Thank you for your help it would be much appreciated...

Failed to retrieve Article

After install i get on the most of the spots the next error:

getHeader(): Failed to retrieve article: getHeader(): Failed to retrieve article: getHeader(): Failed to retrieve article: getHeader(): Failed to retrieve article: SpotWeb v0.68.32.33 on PHP v7.4.3 crashed object(NntpException)#36 (11) { ["_response":"NntpException":private]=> string(18) "Not in a newsgroup" ["message":protected]=> string(63) "No newsgroup has been selected [response: "Not in a newsgroup"]" ["string":"CustomException":private]=> NULL ["code":protected]=> int(412) ["file":protected]=> string(60) "/var/www/spotweb/vendor/spotweb/nntp/src/Protocol/Client.php" ["line":protected]=> int(2281) ["trace":"Exception":private]=> array(11) { [0]=> array(5) { ["file"]=> string(60) "/var/www/spotweb/vendor/spotweb/nntp/src/Protocol/Client.php" ["line"]=> int(1189) ["function"]=> string(10) "throwError" ["class"]=> string(24) "Net_NNTP_Protocol_Client" ["type"]=> string(2) "->" } [1]=> array(5) { ["file"]=> string(51) "/var/www/spotweb/vendor/spotweb/nntp/src/Client.php" ["line"]=> int(516) ["function"]=> string(7) "cmdHead" ["class"]=> string(24) "Net_NNTP_Protocol_Client" ["type"]=> string(2) "->" } [2]=> array(5) { ["file"]=> string(59) "/var/www/spotweb/lib/services/Nntp/Services_Nntp_Engine.php" ["line"]=> int(325) ["function"]=> string(9) "getHeader" ["class"]=> string(15) "Net_NNTP_Client" ["type"]=> string(2) "->" } [3]=> array(5) { ["file"]=> string(59) "/var/www/spotweb/lib/services/Nntp/Services_Nntp_Engine.php" ["line"]=> int(338) ["function"]=> string(9) "getHeader" ["class"]=> string(20) "Services_Nntp_Engine" ["type"]=> string(2) "->" } [4]=> array(5) { ["file"]=> string(59) "/var/www/spotweb/lib/services/Nntp/Services_Nntp_Engine.php" ["line"]=> int(338) ["function"]=> string(9) "getHeader" ["class"]=> string(20) "Services_Nntp_Engine" ["type"]=> string(2) "->" } [5]=> array(5) { ["file"]=> string(59) "/var/www/spotweb/lib/services/Nntp/Services_Nntp_Engine.php" ["line"]=> int(338) ["function"]=> string(9) "getHeader" ["class"]=> string(20) "Services_Nntp_Engine" ["type"]=> string(2) "->" } [6]=> array(5) { ["file"]=> string(64) "/var/www/spotweb/lib/services/Nntp/Services_Nntp_SpotReading.php" ["line"]=> int(194) ["function"]=> string(9) "getHeader" ["class"]=> string(20) "Services_Nntp_Engine" ["type"]=> string(2) "->" } [7]=> array(5) { ["file"]=> string(71) "/var/www/spotweb/lib/services/Providers/Services_Providers_FullSpot.php" ["line"]=> int(46) ["function"]=> string(12) "readFullSpot" ["class"]=> string(25) "Services_Nntp_SpotReading" ["type"]=> string(2) "->" } [8]=> array(5) { ["file"]=> string(66) "/var/www/spotweb/lib/services/Actions/Services_Actions_GetSpot.php" ["line"]=> int(28) ["function"]=> string(13) "fetchFullSpot" ["class"]=> string(27) "Services_Providers_FullSpot" ["type"]=> string(2) "->" } [9]=> array(5) { ["file"]=> string(46) "/var/www/spotweb/lib/page/SpotPage_getspot.php" ["line"]=> int(23) ["function"]=> string(11) "getFullSpot" ["class"]=> string(24) "Services_Actions_GetSpot" ["type"]=> string(2) "->" } [10]=> array(5) { ["file"]=> string(26) "/var/www/spotweb/index.php" ["line"]=> int(127) ["function"]=> string(6) "render" ["class"]=> string(16) "SpotPage_getspot" ["type"]=> string(2) "->" } } ["previous":"Exception":private]=> NULL ["string":"Exception":private]=> string(0) "" ["_detail"]=> string(30) "No newsgroup has been selected" ["_code"]=> int(412) } No newsgroup has been selected [response: "Not in a newsgroup"]

Is there something wrong in the settings?

I hope you can help me with this problem.

Greetings justin

Invalid date.timezone value 'EuropeAmsterdam'

Created a container with the latest build, after completing the install, this message is displayed:
"Warning: strftime(): Invalid date.timezone value 'EuropeAmsterdam', we selected the timezone 'UTC' for now. in /var/www/spotweb/lib/SpotTemplateHelper.php on line 1058", in the list of spots.
Tried to start the container with "TZ = Europe\Amsterdam" but error still appears.
image

dbsettings.inc.php has wrong owner

Just pulled this image to replace my locally running spotweb instance with a dockerized version. When starting, spotweb keeps complaining it cannot connect to the database.

Figured out that the dbsettings.inc.php file is linked from entrypoint.sh and has an owner root:root, in stead of www-data:www-data. When removing the symlink, copying the file from /config and change the owner, everything works perfect!
For some reason, the chown in the entrypoint.sh does not touch the symlink.

I am running Docker on an Ubuntu server 20.04 LTS

New build: exec /entrypoint.sh: exec format error

I had to do a new build today for my Pi3 and Pi4 that both run OMV.

After the rebuild on both systems, I get the following errors in the logs:

exec /entrypoint.sh: exec format error

Are there not ARM builds available?

mysql port

Hi!

For starters, thanks for the docker image of spotweb, running great on my NAS! I however needed to tweak it a little since spotweb assumes you run your mysql db on 3306. I have opened the following issue: spotweb/spotweb#321

If I get approval, can I push the changes through for your dockerized spotweb here?

Thx!

Fatal error: Uncaught Error: Class 'PDO' not found in /var/www/spotweb/lib/dbeng/dbeng_pdo_mysql.php

Hi,

When creating the container, all works but after stopping and starting the docker container, I get the following error:

Fatal error: Uncaught Error: Class 'PDO' not found in /var/www/spotweb/lib/dbeng/dbeng_pdo_mysql.php:25 Stack trace: #0 /var/www/spotweb/lib/Bootstrap.php(117): dbeng_pdo_mysql->connect(‘x.x.x.x’, 'spotweb', ‘xxxxx’, 'spotweb') #1 /var/www/spotweb/lib/Bootstrap.php(34): Bootstrap->getDaoFactory() #2 /var/www/spotweb/index.php(18): Bootstrap->boot() #3 {main} thrown in /var/www/spotweb/lib/dbeng/dbeng_pdo_mysql.php on line 25

anyone knows what causes this?

Unsuccessful install with "Permanent installation" on Synology

After I have done "install.php" all looks fine but when I try to make it permanent it looks like the environment settings are not parsing to the container. What is going wrong and how can I debug to find the cause. I run the container on a Synology with intel processor. Here is also my environment page and the result in the browser:

2019-05-30 15_46_50-snoek - Synology DiskStation

2019-05-30 15_49_34-snoek - Synology DiskStation

2019-05-30 15_45_34-192 168 10 10_81

Settings mapping

It would be nice if the "reallymyownsettings.php" would also be symlinked from the /config directory to the /var/www/spotweb directory just like the "ownsettings.php" and "dbsettings.inc.php" upon start of the docker container.

I am running spotweb through a proxy with SSL and needed to set the $settings['spotweburl']. I just created my own symlink directly into the /var/www/spotweb directory. This works great but it would be easier if this file is also symlinked by default. I expected the whole directory to be readable by spotweb but upon start of the container the symlinks are created. Just not the one for
"reallymyownsettings.php"

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.