Skip to content

Published projects not found when server is freshly launched #134

Open

Description

@nagarjunam65-cloud

After publishing projects in the application, I expected them to persist across server restarts (since the app is running in Docker). However, when I freshly launch the server, none of the previously published projects are found. It looks as if the published projects are not being stored in a persistent location inside the Docker container.

Please provide a fix or guidance on how to properly persist published projects.

Image

Activity

  1. athreyrk commented on Apr 1, 2026

    @athreyrk

    From what I can tell, this is because the attached database gets wiped every time you restart the server, as can seen by the

    Hibernate: drop table ...
    Hibernate: create table ...
    

    in the logs.

    And this is due to the hibernate.hbm2ddl.auto property set to create-drop inside conf/META-INF/persistence.xml. That property is propagated by its persistence-unit with name sysml2-hibernate in

    jpa.default = sysml2-hibernate
    

    in conf/application.conf.

    Setting the property value to update worked for me.

  2. athreyrk commented on Apr 2, 2026

    @athreyrk

    Additionally, the data in the postgresql Docker container would be cleared when it is deleted. To persist this, start the Docker container with a named volume (extra -v argument) like this:

    docker run --name sysml2-postgres -p 5432:5432 -e POSTGRES_PASSWORD=mysecretpassword -e POSTGRES_DB=sysml2 -d -v sysmlv2_db:/var/lib/postgresql/data postgres
    

    where the sysmlv2_db is the name of the persistent Docker volume that will be created and mounted to the container (can be changed), and /var/lib/postgresql/data is where postgresql stores its data (shouldn't be changed).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions