Page 1 of 1

Configuration Step #3 w/ Docker

Posted: Thu May 23, 2019 3:02 pm
by srse
OC Version: 3.0.3.2
Theme: N/A
Extension/Mods: N/A

I'm just trying to get started developing locally and on step 3/4 of configuration where I'm supposed to put in database connection details, I'm getting:

Code: Select all

 Error: Could not make a database link using root@localhost!
Here is my docker-compose.yml (myrepo is a placeholder for my actual repo):

Code: Select all

opencart:
  image: myrepo/opencart:3.0.3.2
  ports:
    - "3000:80"
  links:
    - mysql
  volumes:
    - /var/www
    - /var/www/html/system/storage/vendor

mysql:
  image: mysql
  environment:
    - MYSQL_USER=root
    - MYSQL_ROOT_PASSWORD=opencart
    - MYSQL_DATABASE=db_opencart
  ports:
    - '3306:3306'
  expose:
    - '3306'
  volumes:
    - ./db:/var/lib/mysql
And here is what I have in configuration (the password is correct):

Image

I'm starting it up with `docker-compose up` and I'm able to walk through the configuration steps up until this. Can anyone help point to what might be going wrong?

Re: Configuration Step #3 w/ Docker

Posted: Thu May 23, 2019 6:09 pm
by dparakhiya
On step 3: Add hostname "mysql" instead of localhost

Re: Configuration Step #3 w/ Docker

Posted: Thu May 23, 2019 11:19 pm
by srse
dparakhiya wrote:
Thu May 23, 2019 6:09 pm
On step 3: Add hostname "mysql" instead of localhost
Thank you dparakhiya; I should have known that. But now it shows:

Code: Select all

Error: Could not make a database link using root@mysql!
Anything else wrong with the way I've set this up?

Re: Configuration Step #3 w/ Docker

Posted: Fri May 24, 2019 4:15 am
by srse
Nevermind, I gave up on setting it up myself and went with bitnami/opencart. Super easy to get started!!! :o