Giter Site home page Giter Site logo

Comments (7)

intri-in avatar intri-in commented on May 27, 2024 1

Can you visit http://localhost:3000/install/ and see if the tables have been installed?

from manage-my-damn-life-nextjs.

Knud3 avatar Knud3 commented on May 27, 2024

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.

from manage-my-damn-life-nextjs.

intri-in avatar intri-in commented on May 27, 2024

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:

Option 1: Run without Docker

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.

Option 2:

Really convoluted way to make docker work.

  1. Setup your .env file, which you probably have since you are getting OK status connecting to database on the first screen.
  2. Run docker compose up so that your mysql container is running.
  3. In a separate window, go to the cloned repo.
  4. Run docker ps and get container id of mysql container for mmdl.
  5. Get the local IP address of your mysql container for mmdl docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' ID_OF_YOUR_MMDL_MYSQL_CONTAINER
  6. Use this IP address as DB_HOST variable in your .env file.
  7. Run npm run migrate to run db migrations inside your docker mysql container.

from manage-my-damn-life-nextjs.

Knud3 avatar Knud3 commented on May 27, 2024

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

from manage-my-damn-life-nextjs.

intri-in avatar intri-in commented on May 27, 2024

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.

from manage-my-damn-life-nextjs.

Knud3 avatar Knud3 commented on May 27, 2024

Seems to be working now

/app # npm run migrate

> [email protected] 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)

from manage-my-damn-life-nextjs.

Knud3 avatar Knud3 commented on May 27, 2024

I hope you do not mind that I opened some propositions :)

from manage-my-damn-life-nextjs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.