Passbolt first configuration with existing database failed

Hello,

I am trying to update my passbolt from v2.8.3 to v3.12.0-3 (Docker).
Here my docker-compose file :

version: '3.4'
services:
  db:
    image: mariadb:10.3
    container_name : mariadb_passbolt
    restart: always
    env_file:
      - env/mysql.env
    volumes:
      - database_volume:/var/lib/mysql
    ports:
      - "127.0.0.1:3306:3306"

  passbolt:
    image: passbolt/passbolt:3.12.0-3
    container_name: passbolt
    restart: always
    tty: true
    depends_on:
      - db
    env_file:
      - env/passbolt.env
    volumes:
      - gpg_volume:/var/www/passbolt/config/gpg
      - images_volume:/var/www/passbolt/webroot/img/public
      - ./certs/cert.pem:/etc/ssl/certs/certificate.crt:ro
      - ./certs/key.pem:/etc/ssl/certs/certificate.key:ro
    tmpfs:
      - /run
    command: ["/usr/bin/wait-for.sh", "db:3306", "--", "/docker-entrypoint.sh"]
    ports:
      - 80:80
      - 443:443

volumes:
  database_volume:
  gpg_volume:
  images_volume:

I first had a nginx 502 error which I solved in creating a “php” folder in /run folder in my passbolt container.

Now I am in the first configuration page of passbolt where I need to enter my database url.

I have tried 127.0.0.1 (port 3306) and IP adress of my server but it says “connection could not be established…”

I have check that my mariadb docker is running and I am able to connect to it using “docker exec -it mariadb_passbolt bash” and “mysql -u passbolt - p” then entering my password.

I do not know what do to next…

Let me know if you have any suggestion?

Thanks,
Michael

I think this is a common issue users are having because there are other containers running… do you have other containers running?

No, I have checked using the “docker ps” command.
I have only two container running :
-My passbolt container
-MariaDb Container

The db ports should not be needed because it’s 3306 by default. I’m assuming you’ve tried the default file already?

Make sure to backup your db!

Hello,

I have just tested with the “default” docker-compose file from github and I have now error with my database.
It probably does not like the upgrade of mariadb version from 10.3 to 10.10.

I revert to my backup image with passbolt v2.8.3. I think I will keep this version as I am unable to update to new version…
The only issue is that since last week I am not able to copy password anymore. It does not show the popup to copy the password. I haven’t changed my passbolt version and all user are not able to use it anymore…

For the change in mariadb versions you have to run an extra command on the database container:
mysql_upgrade -u root -p

Or you could do this in steps and use the newer passbolt container and set mariadb back to 10.3 instead of 10.10, and then once you have that working you could update mariadb

1 Like