Moving from development to production

Hi, trying to migrate my selfhosted instance (using docker compose) from 0.34.0 to 0.35.0 I started by changing RAILS_ENV from development to production but I’m not sure what to do with DATABASE_NAME variable which currently holds dawarich_development value; should I change it to dawarich_production (or remove it so it takes dawarich_$RAILS_ENV value), if so will data be migrated (or should I run something to migrate it)? If not, should I stick with dawarich_development database even though environment is now productive?

I looked for instructions regarding this in documentation, Discourse and Github issues but couldn’t find an answer. Maybe this question might help someone else.

Cheers and thanks for such a great product.

Found the answer in Discord. So changed RAILS_ENV to production, changed DATABASE_NAME to dawarich. Stopped containers (all but DB one), changed database name:

$ docker exec -ti dawarich-db bash
# psql -U $POSTGRES_USER
...
> ALTER DATABASE dawarich_development RENAME TO dawarich;

Updated containers straight from 0.34.0 to 1.6.1 following instructions in release notes and all worked.

Cheers.

1 Like