Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Retain db across restart or server reboots #136

Open
prasadbmore opened this issue May 29, 2024 · 1 comment
Open

Retain db across restart or server reboots #136

prasadbmore opened this issue May 29, 2024 · 1 comment

Comments

@prasadbmore
Copy link

We have setup an instance following the steps mentioned and are able to play with demo data.

Further we went ahead and added our own data like new programs, facilities, users, etc. But this data is getting wiped across reboots and restarts. We tried production mode option, but still the data is getting wiped - actually with production mode we are not able to login. Is there any step we are missing - or particular sequence of steps to keep the newly added data from getting wiped?

Any help or pointers would be appreciated. Thanks!

@prasadbmore prasadbmore changed the title Retain db across server reboots Retain db across restart or server reboots May 29, 2024
@hassanhussein
Copy link
Member

hassanhussein commented May 29, 2024

Hi @prasadbmore

To fix this you need to set ./deploy_to_env.sh and settings.env(export spring_profiles_active=production).

Step 1 in deploy.sh file.

set export KEEP_OR_WIPE="keep"
export PROFILES='production' # strip any leading commas
export spring_profiles_active=$PROFILES
echo "Profiles to use: $spring_profiles_active"

start it up

docker-compose up --build --force-recreate -d

Step 2. In docker-compose.yml set pg_data as external volume.
Example:

  pg-data:
    external: true

Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants