Open sindile opened 5 years ago
I am having the same problem. Is there any solution to this?
I figured out a workaround.
docker cp [Path to Demo.dump]\demo.dump [Your container id]:\
docker exec -it [Your container id] /bin/sh -c "[ -e /bin/bash ] && /bin/bash || /bin/sh"
su postgres
pg_restore --verbose --clean --no-acl --no-owner -h localhost -d cmdbuild_3 demo.dump
Oh wait, I see now I got this error because I had initially skipped a step. If you run the docker-compose.yml file from where it is after cloning the repository then it works and no workaround is needed.
I skipped this:
git clone https://github.com/itmicus/cmdbuild_docker
Oh wait, I see now I got this error because I had initially skipped a step. If you run the docker-compose.yml file from where it is after cloning the repository then it works and no workaround is needed.
I skipped this:
git clone https://github.com/itmicus/cmdbuild_docker
No actually this doesnt work as it is supposed to. My original solution post is the only work around currently.
Please check now
docker run --name openmaint_db -p 5432:5432 -d itmicus/cmdbuild:db-3.0
docker run --name openmaint_app --restart unless-stopped -e CMDBUILD_DUMP="demo.dump.xz" --link openmaint_db -p 8090:8080 -d itmicus/cmdbuild:om-2.0-3.2
I modified my docker-compose.yml and change to CMDBUILD_DUMP=openmaint_demo.dump.xz
running docker-compose up -d
and going to http://localhost:8090/cmdbuild
Closing the small window and clicking apply patches I get the following
With the following error message org.cmdbuild.dao.DaoException: error processing patch = Patch{version=1.0.3-01, category=core, applied=false}, caused by: org.cmdbuild.dao.DaoException: error processing patch = core-1.0.3-01 (Change Role class type from reserved to sysread), caused by: org.springframework.jdbc.BadSqlGrammarException: StatementCallback; bad SQL grammar [ SET SESSION cmdbuild.ignore_tenant_policies = 'true'; SET SESSION cmdbuild.user_tenants = '{}'; DO $$ BEGIN RAISE NOTICE 'apply cmdbuild patch %', 'core-1.0.3-01'; END $$ LANGUAGE PLPGSQL; -- Change Role class type from reserved to sysread COMMENT ON TABLE "Role" IS 'MODE: sysread|TYPE: class|DESCR: Roles|SUPERCLASS: false|MANAGER: class|STATUS: active'; DO $$ BEGIN RAISE NOTICE 'applied cmdbuild patch %', 'core-1.0.3-01'; END $$ LANGUAGE PLPGSQL; ]; nested exception is org.postgresql.util.PSQLException: ERROR: relation "Role" does not exist, caused by: org.postgresql.util.PSQLException: ERROR: relation "Role" does not exist