Open jinyeow opened 2 years ago
That sounds really strange, why would the usernames change? I'll try to reproduce this
Sorry, could not reproduce this, even after deleting all the containers, everything was picked up the way it should
Same for me. Data not persistent after Recreate for update. No workout, no users, no new exercises. Portainer creation same issue.
version: '3.7'
services: web: image: wger/server:latest volumes:
cache
db: image: postgres:12-alpine volumes:
POSTGRES_DB=wger
cache: restart: always image: redis:latest expose:
volumes: postgres-data: static: media:
@alancarrillo do you get some error or anything suspicious in the startup logs or something?
@alancarrillo do you get some error or anything suspicious in the startup logs or something?
No, no errors, no warnings, anything suspicious. The log:
Applying manager.0004_auto_20150609_1603... OK Applying core.0002_auto_20141225_1512... OK Applying core.0003_auto_20150217_1554... OK Applying core.0004_auto_20150217_1914... OK Applying core.0005_auto_20151025_2236... OK Applying core.0006_auto_20151025_2237... OK Applying core.0007_repetitionunit... OK Applying core.0008_weightunit... OK Applying core.0009_auto_20160303_2340... OK Applying core.0010_auto_20170403_0144... OK Applying core.0011_auto_20201201_0653... OK Applying core.0012_auto_20210210_1228... OK Applying core.0013_auto_20210726_1729... OK Applying easy_thumbnails.0001_initial... OK Applying easy_thumbnails.0002_thumbnaildimensions... OK Applying exercises.0002_auto_20150307_1841... OK Applying exercises.0003_auto_20160921_2000... OK Applying exercises.0004_auto_20170404_0114... OK Applying exercises.0005_auto_20190618_1617... OK Applying exercises.0006_auto_20201203_0203... OK Applying exercises.0007_auto_20201203_1042... OK Applying exercises.0008_exercisebase... OK Applying exercises.0009_auto_20201211_0139... OK Applying exercises.0010_auto_20201211_0205... OK Applying exercises.0011_auto_20201214_0033... OK Applying exercises.0012_auto_20210327_1219... OK Applying exercises.0013_auto_20210503_1232... OK Applying exercises.0014_exerciseimage_style... OK Applying gallery.0001_initial... OK Applying mailer.0001_initial... OK Applying mailer.0002_auto_20190618_1617... OK Applying mailer.0003_auto_20201201_0653... OK Applying manager.0005_auto_20160303_2008... OK Applying manager.0006_auto_20160303_2138... OK Applying manager.0007_auto_20160311_2258... OK Applying manager.0008_auto_20190618_1617... OK Applying manager.0009_auto_20201202_1559... OK Applying manager.0010_auto_20210102_1446... OK Applying manager.0011_remove_set_exercises... OK Applying manager.0012_auto_20210430_1449... OK Applying manager.0013_set_comment... OK Applying manager.0014_auto_20210717_1858... OK Applying manager.0015_auto_20211028_1113... OK Applying measurements.0001_initial... OK Applying measurements.0002_auto_20210722_1042... OK Applying nutrition.0001_initial... OK Applying nutrition.0002_auto_20170101_1538... OK Applying nutrition.0003_auto_20170118_2308... OK Applying nutrition.0004_auto_20200819_2310... OK Applying nutrition.0005_logitem... OK Applying nutrition.0006_auto_20201201_0653... OK Applying nutrition.0007_auto_20201214_0013... OK Applying nutrition.0008_auto_20210102_1446... OK Applying nutrition.0009_meal_name... OK Applying nutrition.0010_logitem_meal... OK Applying sessions.0001_initial... OK Applying sites.0001_initial... OK Applying sites.0002_alter_domain_unique... OK Applying weight.0001_initial... OK Applying weight.0002_auto_20150604_2139... OK Applying weight.0003_auto_20160416_1030... OK Installed 1 object(s) from 1 fixture(s) Installed 16 object(s) from 1 fixture(s) Installed 6 object(s) from 1 fixture(s) Installed 3 object(s) from 1 fixture(s) Installed 5 object(s) from 1 fixture(s) Installed 7 object(s) from 1 fixture(s) Installed 6 object(s) from 1 fixture(s) Installed 6 object(s) from 1 fixture(s) Installed 512 object(s) from 1 fixture(s) Installed 1 object(s) from 1 fixture(s) Installed 10 object(s) from 1 fixture(s) Installed 16 object(s) from 1 fixture(s) Installed 7 object(s) from 1 fixture(s) Installed 355 object(s) from 1 fixture(s) Installed 528 object(s) from 1 fixture(s) Installed 1 object(s) from 1 fixture(s) Installed 1 object(s) from 1 fixture(s) Installed 1 object(s) from 1 fixture(s) *** Password for user admin was reset to 'adminadmin' Installed 3 object(s) from 1 fixture(s) yarn install v1.22.5 [1/5] Validating package.json... [2/5] Resolving packages... [3/5] Fetching packages... [4/5] Linking dependencies... [5/5] Building fresh packages... Done in 14.65s. yarn run v1.22.5 $ sass wger/core/static/scss/main.scss:wger/core/static/yarn/bootstrap-compiled.css Done in 8.06s. Using django's development server... Watching for file changes with StatReloader Performing system checks...
System check identified no issues (0 silenced). February 11, 2022 - 00:23:20 Django version 3.2.12, using settings 'settings' Starting development server at http://0.0.0.0:8000/ Quit the server with CONTROL-C.
That it runs the migrations definitely means that the db did not survive and it's creating it new, otherwise it would just ignore them
After firts install. Should I erase or modify something? (For example: some install carpet o config file) What can I do for avoid migrations after upgrade? (Recreate container)
No you don't need to do anything. In theory the db should never be overwritten and I have never been able to reproduce this behavior
Ok, I'll keep trying to get persistent data. Thank you very much for your time and work.
@alancarrillo can you try the docker-compose file from the repo and see if the problem happens there as well?
I have tried with docker in my NAS and my NUC windows10 , with different configurations and so far the same behavior. :/ I have 44 containers running on my NAS with no data persistence issues.
I'll figure it out one way or another. Thanx.
A backup and restore option would be great.
Try naming the volume in the compose file corresponding to a named local volume in portainer
After I restarted my docker container, my users data did not persist. I can see 3 users (default admin, the pre-reboot admin, the pre-reboot user) but the pre-reboot users names are some random alphanumeric string, and I can't login with the username/password I had setup previously.
I had only started using it, so I'm not sure about the other workout data. But I am wondering what else I need to do/may have missed to make this persistent across restarts of the container.
My docker-compose.yml: