Open nathanmerry opened 4 months ago
Looks like the image is not reading the variables defined on the docker-compose.yml file.
I copied the sample file out of the image (/var/www/html/_includes/config.SAMPLE.inc.php
), edited it to use the env values and mounted it:
docker-compose.yaml:
...
volumes:
- ./config.inc.php:/var/www/html/_includes/config.inc.php
...
config.inc.php:
<?php
/**
* /_includes/config.SAMPLE.inc.php
*
* This file is part of DomainMOD, an open source domain and internet asset manager.
* Copyright (c) 2010-2024 Greg Chetcuti <greg@chetcuti.com>
*
* Project: http://domainmod.org Author: http://chetcuti.com
*
* DomainMOD is free software: you can redistribute it and/or modify it under the terms of the GNU General Public
* License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later
* version.
*
* DomainMOD is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
* warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License along with DomainMOD. If not, see
* http://www.gnu.org/licenses/.
*
*/
?>
<?php
// Path Settings
$web_root = getenv('DOMAINMOD_WEB_ROOT');
// Database Settings
$dbhostname = getenv('DOMAINMOD_DATABASE_HOST');;
$dbname = getenv('DOMAINMOD_DATABASE');;
$dbusername = getenv('DOMAINMOD_USER');;
$dbpassword = getenv('DOMAINMOD_PASSWORD');;
Could you make a pr for that? Seems Like That is a General Problem with this App for docker Installation
i just tried domainmod in docker for the first time today and have this exact problem. Was it ever fixed?
I'm having the same issue and I can't seem to fix it. Any suggestions for a workaround?
as @nublaii said, you must create a copy of /var/www/html/_includes/config.SAMPLE.inc.php
to /var/www/html/_includes/config.inc.php
👍
There is indeed something missing in the Docker image that uses the environment variables from docker-compose.yml
and configures the service (by creating the _includes/config.inc.php
file with the data from the env vars.
I created a PR on the docker-source project that should help with that.
So I fixed that, but now I'm getting this:
No such file or directory in /var/www/html/classes/DomainMOD/Database.php:33\nStack trace:\n#0 /var/www/html/classes/DomainMOD/Database.php(33): PDO->__construct()\n#1 /var/www/html/classes/DomainMOD/Database.php(49): DomainMOD\\Database->__construct()\n#2 /var/www/html/index.php(29): DomainMOD\\Database::getInstance()\n#3 {main}\n thrown in /var/www/html/classes/DomainMOD/Database.php on line 33
EDIT: Just kidding I'm an idiot, don't mind me.
Hello,
I am attempting to run your service using Docker; however, I am having issues with the initial setup. I am running this all on my local machine.
When I attempt to run docker-compose up -d and view it locally, I receive a 500 error. After inspecting the logs, I can see the error
chmod: cannot access '/var/www/html/temp'
: No such file or directory.Then when I open the server in the browser, I see the following logs:
Do you know what the issue could be?
My docker-compose.yml: