MoriTanosuke / wallabag-docker

A simple dockerfile to run wallabag
3 stars 1 forks source link

Apache2 Directives #1

Closed rchampagneca closed 7 years ago

rchampagneca commented 7 years ago

My Apache2 directives for /var/www are:

AllowOverride None Order Allow,Deny Allow from All

I'm getting the following log entry:

wallabag_1 | [Sun Nov 06 20:53:08.030807 2016] [autoindex:error] [pid 9] [client XX.XXX.XXX.XX:45101] AH01276: Cannot serve directory /var/www/html/: No matching DirectoryIndex (index.php,index.html) found, and server-generated directory index forbidden by Options directive

MoriTanosuke commented 7 years ago

Try opening /app.php instead of /. Does this work?

I also just pushed a commit with an example docker-compose.yml, if you want to give that a try.

rchampagneca commented 7 years ago

As you may have guessed, I'm quite a newbie with regards to Docker.

So, I've pulled the latest Dockerfile and Docker-Compose YML files. I'm getting:

Fatal error: Uncaught PDOException: SQLSTATE[HY000] [14] unable to open database file in /var/www/wallabag/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php:43 Stack trace: #0 /var/www/wallabag/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOConnection.php(43): PDO->__construct('sqlite:/var/www...', 'root', NULL, Array) #1 /var/www/wallabag/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOSqlite/Driver.php(56): Doctrine\DBAL\Driver\PDOConnection->__construct('sqlite:/var/www...', 'root', NULL, Array) #2 /var/www/wallabag/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(360): Doctrine\DBAL\Driver\PDOSqlite\Driver->connect(Array, 'root', NULL, Array) #3 /var/www/wallabag/vendor/doctrine/dbal/lib/Doctrine/DBAL/Connection.php(1017): Doctrine\DBAL\Connection->connect() #4 /var/www/wallabag/vendor/lexik/maintenance-bundle/Drivers/Query/DefaultQuery.php(52): Doctrine\DBAL\Connection->exec('CREATE TABLE IF...') #5 /var/www/wallabag/vendor/lexik/maintenance-bundle/Drivers/Query/DefaultQuery.php(38): Lexik\Bundl in /var/www/wallabag/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/AbstractSQLiteDriver.php on line 82

MoriTanosuke commented 7 years ago

Ah, I totally forgot that I ran the container with data from a previous backup. I added the empty sqlite database to the repository, so if you run docker-compose up again, everything should be fine.

Please note, that the first login fails for some reason. If you re-open http://localhost:8111 you should see the default list of articles though. I don't know yet why the first login fails, but I always had some issues with wallabags URL redirection... :-(

rchampagneca commented 7 years ago

Making progress ... Got to the login screen, but during registration, I got 500: Internal Server Error

an exception occurred while executing 'INSERT INTO "wallabag_user" (username, username_canonical, email, email_canonical, enabled, salt, password, last_login, locked, expired, expires_at, confirmation_token, password_requested_at, roles, credentials_expired, credentials_expire_at, name, created_at, SQLSTATE[HY000]: General error: 8 attempt to write a readonly database

rchampagneca commented 7 years ago

Ah! I had the wrong permissions on the data directory. Now, how can I identify to Wallabag my email server ?

MoriTanosuke commented 7 years ago

Ah, I was about to write about the permissions of the mounted data directory. Glad you found it already.

This is more a question of configuring wallabag. Looks like the framework Symfony has a built in way to configure SMTP settings and the like, see https://github.com/wallabag/wallabag/pull/1824

For the Dockerfile, you can add a parameters.yml like I prepared in the docker-compose.yml. To get the current parameters.yml, start the container and execute the following command

docker cp wallabagdocker_wallabag_1:/var/www/wallabag/app/config/parameters.yml

If you renamed the directory with the Dockerfile from wallbag-docker to something else, you might want to check the name of the container first. Use

docker ps

to check the name of the running container and replace it in the command line above. After you copied the default parameters.yml from your container, you can modify the file, enable the line in docker-compose.yml and remove+restart the container.

To remove+restart, use

docker-compose stop
docker-compose rm
docker-compose up

HTH

rchampagneca commented 7 years ago

Hi, Just completed the installation as you've outlined in your posts above. Regards. Roger.