Migrating from normal installation to docker container
adocampo opened this issue · comments
sysPass Version
3.2.11
Describe the question
I'm migrating all my services from legacy virtual machines to docker containers. I'm facing issues with syspass as I'm not able to connect to the external database (which I want to keep in a VM at least as for now) with the installer.
I saw there is no environment variable to specify an external MySQL database on the Dockerfile, so I just removed all the db settings on that Dockerfile and tried to run the container just without it, and specify my external database on the installation wizard.
As I was afraid to break something, I'd created a second blank database syspass2
with the very same credentials and granted permissions, but I don't know why, I wasn't able to complete the installation wizard, yet I could reach the database host and port, and double-checked the credentials.
What I'd tried first was to copy the config.xml
file from production syspass to the docker version, but it gave a blank screen saying Template does not contain files
. My bet was because my production syspass instance has a path with all lower case while docker has the directory syspass as "sysPass" (instead of "syspass"), I did a grep, and it was shown on so many places I desisted to follow that way.
So I did a mysqldump from syspass
database and restored into syspass2
database, modified config.xml
to point to that database, and also changed the "Installed" parameter on config.xml
so now the login screen appears, but I'm not able to login.
I also have LDAP (AD) configured, so I also copied the settings from the syspass VM instance to the docker instance config.xml
and I tried with an LDAP user, entered the credentials and it says Your previous password is needed
and a screen like this appears
So, I'm really having a bad time migrating syspass, I would appreciate any advice
Same problem migrating from 3.1 to 3.2.11-docker.
My problems are:
- Many users cant login anymore;
- the session expires constantly;
- I set to view in cards, but shows in list mode;
I used the following docker-compose.yml
successfully:
version: '3'
services:
syspass:
container_name: syspass
image: syspass/syspass:3.2.11-php7.4
restart: unless-stopped
ports:
- 80:80
volumes:
- SOME_PATH/config:/var/www/html/sysPass/app/config
- SOME_PATH/backup:/var/www/html/sysPass/app/backup
environment:
- USE_SSL=no
- COMPOSER_EXTENSIONS=syspass/plugin-authenticator:^v2.2
extra_hosts:
- "host.docker.internal:host-gateway"
logging:
driver: journald
options:
tag: syspass
The value for dbHost
is set to host.docker.internal
because I have MariaDB running natively on the same server and not in a container.
To migrate the DB I used the mariabackup
tool.