alkacon / opencms-docker

Docker automated OpenCms build
GNU Lesser General Public License v2.1
20 stars 28 forks source link

Conection error external database #20

Open alvaromartmunoz opened 1 year ago

alvaromartmunoz commented 1 year ago

I get constantly this error in docker logs image

i`m trying to configure the container with rds database. I have this docker-compose.yml

version: '3.7'
services:
    opencms:
        image: alkacon/opencms-docker:15.0
        container_name: opencms
        init: true
        restart: always
        ports:
            - "8081:8080"
        volumes:
            - ./opencms-docker-webapps:/usr/local/tomcat/webapps
        command: ["/root/wait-for.sh", "mysql:3306", "-t", "30", "--", "/root/opencms-run.sh"]
        environment:
            - "DB_PASSWD=Qwerty1234!"
            - "DB_HOST=XXXXXXXXXX.eu-west-2.rds.amazonaws.com"
            - "DB_USER=admin"
            - "DB_NAME=opencms"
            - "DEBUG=true"

anyone can help me?? Thanks

dSeidel commented 1 year ago

Hi, in "command" you wait for the mysql service that you do not start anymore. Try command: ["/root/opencms-run.sh"] only. Nevertheless, I'm not sure if the configurable part of the DB connection options is enough to connect successfully or if more adjustments, not configurable via environment variables are necessary. The image as is is designed to connect to MariaDB. But you'll see. Best, Daniel.

alvaromartmunoz commented 1 year ago

Hi!,

I run it only with command: ["/root/opencms-run.sh"] but i get the following error: image i saw the next issue but i don´t find the solution Use external database #12

If i change the RDS connection from mysql to mariadb, it could be possible to fix the error?

Regards, Alvaro.

alvaromartmunoz commented 1 year ago

Hi,

i changed the database type to mariadb and i get the same error.

Regards.

dSeidel commented 1 year ago

I think you are doing a fresh installation, are you? If yes, have you removed all content of your ./opencms-docker-webapps folder before you re-tested?

Sama6717 commented 10 months ago

I had the same problem, i resolved by uninstalling docker and reinstalling it again,

Hi,

i changed the database type to mariadb and i get the same error.

Regards.