Keeping assets and rules on docker restart

Hi all,
I have been using the docker containers to run OpenRemote (same problems on Ubuntu 20 and Windows 10). It runs fine while the docker container is up, but once I run docker-compose restart on it, it seems to fully recreate the postgresql database, even if I tell it to not rebuild the postgresql container, and I’m left with a clean app (no assets, rules, etc).
I’ve also tried changing the docker-compose.yml to have the postgresql volume stored on the local filesystem, with the same result.

The Wiki seems to imply that this is not the intended behaviour of the docker container. Am I using the docker container wrong here? Would appreciate any help!

Hi, check what is the value of SETUP_WIPE_CLEAN_INSTALL environment variable.

@michal it is currently unassigned I think?


I removed the above line from docker-compose.yml, and it seems to have kept some test assets I made. Thank you very much for the help!

1 Like

Shouldnt it be first set true or something before destroying the database? What would happen with this variable set false @Rich ?

SETUP_WIPE_CLEAN_INSTALL defaults to false so by default using the standard docker-compose.yml profile assets etc. are preserved between restarts.

If the postgresql-data docker volume is removed then obviously the value of SETUP_WIPE_CLEAN_INSTALL is irrelevant as the DB would be deleted.

I don’t understand then why the OP had to remove this line from docker-compose.yml in order to preserve data?

Me neither, unless there is some bug in the logic…will test when I get a few minutes