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
Deploy in RPi using MySQL or storing SQLite db #18
Comments
Hi, glad you like the project :) If the application cant find the language, I would guess that the new database file is emtpy or at least wasn't initialized correctly. I'm not sure how docker works when you mount a folder on a path that already has data, it probably overwrites it. You might need to copy the database and the exercise images from the docker image and then mounting them (just guessing here). The application works with mysql and any other database that django supports, so if you instal the app "natively" this wont be a problem. What exactly did you mean that you can't install postgres? If you use the docker compose, everything is configured. But that being said, if you really want to use mysql and docker you will need to adapt the dockerfile/docker-compose and add the necessary dependencies and services |
Hi Roland,
Yes you were right: I've tried to copy the database from a demo standalone container using docker cp and then I put it in my host directory which should be mounted into the container and it works now. Anyway I'm curious about the other solution (MySQL). |
Glad it worked! It's probably possible to make this run with mysql as well, if you already have a db server you will need to open the ports so that the app can talk to it (besides installing the client). You will also need to initialize the db and load the data, but that's two commands. Plus you need to consider that you will have to reinstall the client everytime you pull a new image |
Hello people,
thanks for this amazing project.
I'm trying to deploy an instance of wger in RPi3 for myself but I cannot install PostgreSQL. So I want to know if it is possible to install it using my existing MYSQL DB or at least use the demo image but storing the SQLite DB in a volume.
Regarding the first option (use MYSQL) I didn't find any information of note in the documentation.
Regarding the second option (use the demo image) I tried to attach 3 volume to the container, in the following path:
in order to store a local copy of the sqlite file and all the other static/media files, to achieve the persistence of date across any possible container restarts.
here is the compose-file:
The container starts but when I try to access the webapp it give me the following exception:
I'm almost sure this problem is caused by the fact that I'm mounting a local directory into the container to store the the sqlite db, because I noticed that if I try to remove the volume from db everything works well.
Do you have any suggestion on how I can fix this problem?
Thanks in advance
The text was updated successfully, but these errors were encountered: