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

Persistent volume #1

Open
mariushosting opened this issue Mar 14, 2024 · 7 comments
Open

Persistent volume #1

mariushosting opened this issue Mar 14, 2024 · 7 comments

Comments

@mariushosting
Copy link

Is there any persistent volume to save file in Docker?

@enchant97
Copy link

Seems like there is app/recipe-photos and app.db unless it's overridden by the environment variable DATABASE_URL.

@alexbates
Copy link
Owner

Thanks for pointing that out, there was no persistent storage. I have pushed a new Docker image and updated the Readme. With the latest image, you can use the run command in the Readme to create a volume where data will be retained.

@mariushosting
Copy link
Author

Thanks for pointing that out, there was no persistent storage. I have pushed a new Docker image and updated the Readme. With the latest image, you can use the run command in the Readme to create a volume where data will be retained.

Awesome Thanks!

@mariushosting
Copy link
Author

Thanks for pointing that out, there was no persistent storage. I have pushed a new Docker image and updated the Readme. With the latest image, you can use the run command in the Readme to create a volume where data will be retained.

@alexbates Unfortunately the docker image is now bugged.
Try 'flask --help' for help. Error: No such command 'db'. Error: While importing 'tamari', an ImportError was raised: Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/flask/cli.py", line 218, in locate_app __import__(module_name) File "/tamari.py", line 1, in <module> from app import app, db ImportError: cannot import name 'app' from 'app' (unknown location) Usage: flask [OPTIONS] COMMAND [ARGS]... Try 'flask --help' for help. Error: No such command 'db'. [2024-03-15 17:05:13 +0000] [1] [INFO] Starting gunicorn 21.2.0 [2024-03-15 17:05:13 +0000] [1] [INFO] Listening at: http://0.0.0.0:4888 (1) [2024-03-15 17:05:13 +0000] [1] [INFO] Using worker: sync [2024-03-15 17:05:13 +0000] [9] [INFO] Booting worker with pid: 9 Failed to find attribute 'app' in 'app'. [2024-03-15 17:05:13 +0000] [9] [INFO] Worker exiting (pid: 9) [2024-03-15 17:05:13 +0000] [1] [ERROR] Worker (pid:9) exited with code 4 [2024-03-15 17:05:13 +0000] [1] [ERROR] Shutting down: Master [2024-03-15 17:05:13 +0000] [1] [ERROR] Reason: App failed to load. Error: While importing 'tamari', an ImportError was raised: Traceback (most recent call last): File "/usr/local/lib/python3.12/site-packages/flask/cli.py", line 218, in locate_app __import__(module_name) File "/tamari.py", line 1, in <module> from app import app, db ImportError: cannot import name 'app' from 'app' (unknown location) Usage: flask [OPTIONS] COMMAND [ARGS]... Try 'flask --help' for help. Error: No such command 'db'. Error: While importing 'tamari', an ImportError was raised:

@alexbates
Copy link
Owner

Just tested the newest Docker image on a fresh Debian 11 install and it seems to be working.

It appears that with one error it is not locating app/init.py and with the other it is not locating Flask-Migrate dependency.

Try inspecting the volume as root user. Are there around 10-11 files/directories in this directory?
cd /var/lib/docker/volumes/tamaristorage/_data
ls

Also what system are you on?

@mariushosting
Copy link
Author

I'm using a Synology NAS with Docker. Is the first time I encounter this issue. Right now the Tamari Docker image is not working at all. Was working before the update but without a persistent volume to save the settings & files.

@alexbates
Copy link
Owner

Try this in case it didn't pull the latest image:
docker rm tamari
docker run -d --restart=always --pull always -p 4888:4888 -v tamaristorage:/app --name tamari alexbates/tamari:0.4

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

3 participants