Closed Knud3 closed 10 months ago
Can you visit http://localhost:3000/install/ and see if the tables have been installed?
Oh, I somehow missed that entirely.
When entering that page it gives Your database settings seem fine. You're all set for installation.
in UI and it logs:
Executing (default): SHOW TABLES
[]
installed false
After I click Install
in UI:
[object Object]
Something went wrong. Please try again later. Try checking logs for more details.
There were no log lines for this action.
Meanwhile DB is spamming these lines:
2024-01-15T10:18:51.938298Z 38 [Warning] [MY-013360] [Server] Plugin mysql_native_password reported: ''mysql_native_password' is deprecated and will be removed in a future release. Please use caching_sha2_password instead'
2024-01-15T10:18:51.948927Z 39 [Warning] [MY-013360] [Server] Plugin mysql_native_password reported: ''mysql_native_password' is deprecated and will be removed in a future release. Please use caching_sha2_password instead'
2024-01-15T10:18:51.959378Z 40 [Warning] [MY-013360] [Server] Plugin mysql_native_password reported: ''mysql_native_password' is deprecated and will be removed in a future release. Please use caching_sha2_password instead'
2024-01-15T10:19:01.796875Z 41 [Warning] [MY-013360] [Server] Plugin mysql_native_password reported: ''mysql_native_password' is deprecated and will be removed in a future release. Please use caching_sha2_password instead'
But, those are only warnings for now.
Hi, I think I have the issue figured out, and I will push the changes to this repo, as well as docker hub after I run a few tests.
I will update this issue as soon as fix is available -- at most in a day or two.
UI based installation won't work until I push a fix.
Meanwhile, if you want to try MMDL, you can:
Detailed instructions are here https://manage-my-damn-life-nextjs.readthedocs.io/en/latest/install/Dockerless/Install/
This will run database migrations manually, so you will get to skip the UI based installation.
Really convoluted way to make docker work.
docker compose up
so that your mysql container is running.docker ps
and get container id of mysql container for mmdl.docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ID_OF_YOUR_MMDL_MYSQL_CONTAINER
npm run migrate
to run db migrations inside your docker mysql container. How it would differ when changed hostname to IP address? I do not know about MySQL, but host will be generally found when hostname is used and containers are in same Docker network. Actually exposing port is also not needed if container is not used outside of Docker. It would only add attack vector.
Also there is no npm inside MySQL container:
npm --version
bash: npm: command not found
Also there is no npm inside MySQL container:
the migrate script is in your MMDL container, so you will have to run npm run migrate
inside that. The easiest option would be to just use it without Docker at the moment. Or wait for the fix, which will be pushed soon.
Run npm run migrate to run db migrations inside your docker mysql container.
I could have phrased that better.
Seems to be working now
/app # npm run migrate
> manage-my-damn-life-nextjs@0.4.3 migrate
> npx sequelize-cli db:migrate --env local
Sequelize CLI [Node: 18.16.0, CLI: 6.6.1, ORM: 6.32.1]
Loaded configuration file "config/config.js".
Using environment "local".
== 20230728075614-first_migration: migrating =======
== 20230728075614-first_migration: migrated (1.655s)
== 20230730083903-users-add-columns-nextAuth-v-0.3.0: migrating =======
== 20230730083903-users-add-columns-nextAuth-v-0.3.0: migrated (0.616s)
== 20230730093908-create-session: migrating =======
== 20230730093908-create-session: migrated (0.205s)
== 20230730094838-create-account: migrating =======
== 20230730094838-create-account: migrated (0.169s)
I hope you do not mind that I opened some propositions :)
Should tables created automatically?
I installed MMDL using Docker Compose and these can be found from DB log:
And these from MMDL itself:
Do I need to create these manually?