wyveo / craftcms-docker

Craft3/Craft2 CMS Docker base (Nginx, PHP-FPM 8, PostgreSQL/MariaDB, Redis)
https://hub.docker.com/r/wyveo/craftcms-docker
MIT License
100 stars 31 forks source link

Incorrect DB credentials blocks installation #9

Closed askogrand closed 7 years ago

askogrand commented 7 years ago

Currently, navigating to http://0.0.0.0/admin/install displays the following message:

Can't connect to the database with the credentials supplied in db.php. Please double check them and try again.

When I echo out which ENV variables db.php sees, I get the following:

(
    [driver] => pgsql
    [server] => 
    [user] => craft3beta
    [password] => 
    [database] => 
    [schema] => 
    [tablePrefix] => 
    [port] => 5432
)
helios-worldwide commented 7 years ago

I have the same error message for the craft3 branch.

Are there root credentials we can use temporarily?

askogrand commented 7 years ago

@hylinkdigital You can clone/fork the project and change the .env.sample to lose the CRAFT_ before every environment var.

helios-worldwide commented 7 years ago

@askogrand - thanks. Yes, I manually altered the environment variable references via bash, but that won't persist.

How do I get my local .env changes to apply to the container? Do I have to move the .env file into a volume?

askogrand commented 7 years ago

Create your own Dockerfile, and reference this one. Also have your own .env.sample.

Your Dockerfile will look like:

FROM wyveo/craftcms-docker:craft3beta

ADD .env.sample /usr/share/nginx/.env
colinwilson commented 7 years ago

@askogrand sorry for the long delay.

Fixed the environment variables in the docker-compose.yml [86c4c02744f899e813356731a23b957237841f4e] to resolve this issue.