Giter Site home page Giter Site logo

Comments (11)

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

Hi,

Yes, I am working on a docker image, and it will sure be out very soon.

Thanks!

from manage-my-damn-life-nextjs.

tiritibambix avatar tiritibambix commented on May 27, 2024 1

It's working ! I had MYSQL_DATABASE still at default sample_install_mmdm (shouldn't it be mmdl ? :p )

Thanks a lot for your support. I'll try and setup a calendar and see how it works.

Let me know if you need any user feedback :)

from manage-my-damn-life-nextjs.

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

Hey
I have pushed an image over to docker hub.

You can find it here.

https://hub.docker.com/r/intriin/mmdl

It will still require some configuration to run, which you can learn about here:

https://manage-my-damn-life-nextjs.readthedocs.io/en/latest/install/Docker/

The guide also includes steps to run via Docker Compose.

from manage-my-damn-life-nextjs.

tiritibambix avatar tiritibambix commented on May 27, 2024

Hello !

That's awesome, I'm thrilled to try it.

I run intro an error though.

I followed the instructions and changed mandatory lines as mentioned in the docs, including port as 3000 is already taken on my host. I get this error :

npm ERR! code ENOENT
npm ERR! syscall open
npm ERR! path /app/package.json
npm ERR! errno -2
npm ERR! enoent ENOENT: no such file or directory, open '/app/package.json'
npm ERR! enoent This is related to npm not being able to find a file.
npm ERR! enoent 

Here is my docker-compose file :

networks:
  app-tier:
    driver: bridge


services:
  app:
    image: node:18-alpine
    command: sh -c "npm install && npm run build && npm run start"
    ports:
      - 4000:3000
    working_dir: /app
    volumes:
      - /srv/Files/MMDL/:/app
    depends_on:
      - db
    networks:
      - app-tier   
    environment:
      NEXT_PUBLIC_BASE_URL: "http://192.168.1.103:4000/"
      NEXT_PUBLIC_API_URL: "http://192.168.1.103:4000/api/"
      NEXT_PUBLIC_DEBUG_MODE: "true"
      DB_HOST: localhost
      DB_USER: "user"
      DB_PASS: "password"
      DB_NAME: sdb_mmdl
      DB_CHARSET: "utf8mb4"
      DB_COLLATE: "utf8mb4_0900_ai_ci"
      AES_PASSWORD : samplepassword
      SMTP_HOST : smtp.host
      SMTP_USERNAME :  [email protected]
      SMTP_PASSWORD :  smtp_password
      SMTP_FROMEMAIL :  [email protected]
      SMTP_PORT :  25
      SMTP_USESECURE :  "false"
      
      # User Config
      NEXT_PUBLIC_DISABLE_USER_REGISTRATION: "false"

      # After this value, old ssid will be deleted.
      MAX_CONCURRENT_LOGINS_ALLOWED: 5

      # Maxium length of OTP validity, in seconds.
      MAX_OTP_VALIDITY:  1800

      # Maximum length of a login session in seconds.
      MAX_SESSION_LENGTH: 2592000

      # Enforce max length of session.
      ENFORCE_SESSION_TIMEOUT: "true"

      #Max number of recursions for finding subtasks. Included so the recursive function doesn't go haywire.
      #If subtasks are not being rendered properly, try increasing the value.
      NEXT_PUBLIC_SUBTASK_RECURSION_CONTROL_VAR: 100

      # Whether user is running install from a docker image.
      DOCKER_INSTALL: "true"

      ## Test Mode
      NEXT_PUBLIC_TEST_MODE: "false"

  db:
    image: mysql
    command: --default-authentication-plugin=mysql_native_password
    restart: always
    ports:
      - "3306:3306"    
    networks:
      - app-tier      
    environment:
      MYSQL_DATABASE: sample_install_mmdm
      MYSQL_ALLOW_EMPTY_PASSWORD: ok
      MYSQL_ROOT_PASSWORD: password
      MYSQL_ROOT_HOST: '%'

And here is the complete log

What am I doing wrong ?

from manage-my-damn-life-nextjs.

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

It looks like docker compose can't find package.json.

From your configuration, I see you have this :

volumes:
      - /srv/Files/MMDL/:/app

Are you sure that this path is correct, and /srv/Files/MMDL/ is the correct the path to the cloned repository's folder?

For the build to complete, your directory structure should look like this:

/srv/Files/MMDL/
|----package.json
|---docker-compose.yml
|---next.config.js
|---src/
|---public/
etc.

from manage-my-damn-life-nextjs.

tiritibambix avatar tiritibambix commented on May 27, 2024

Oh yes, thank you. I wasn't doing things wright.
The installation process gets another error now.

You can see the logs here

from manage-my-damn-life-nextjs.

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

Did the server crash? If yes, restart it and try going to http://localhost:4000/install and see if you see any errors

from manage-my-damn-life-nextjs.

tiritibambix avatar tiritibambix commented on May 27, 2024

It did crash. I restarted and landed on the install page with this error :

Error connecting to database. Check your database settings. Here's some more information:

{"errno":-111,"code":"ECONNREFUSED","syscall":"connect","address":"127.0.0.1","port":3306,"fatal":true}

I'm checking the db config and it seems good on my end (with the little I know).
Do DB_PASS and MYSQL_ROOT_PASSWORD have to match ? (they do in my config)

edit: more in the logs

api/install/check connStatus
Error: connect ECONNREFUSED 127.0.0.1:3306
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1494:16)
    --------------------
    at Protocol._enqueue (/app/node_modules/mysql/lib/protocol/Protocol.js:144:48)
    at Protocol.handshake (/app/node_modules/mysql/lib/protocol/Protocol.js:51:23)
    at Connection.connect (/app/node_modules/mysql/lib/Connection.js:116:18)
    at Connection._implyConnect (/app/node_modules/mysql/lib/Connection.js:454:10)
    at Connection.ping (/app/node_modules/mysql/lib/Connection.js:207:8)
    at /app/.next/server/chunks/2814.js:89:13
    at new Promise (<anonymous>)
    at testDBConnectionSimple (/app/.next/server/chunks/2814.js:88:12)
    at handler (/app/.next/server/pages/api/install/check.js:108:117)
    at Object.apiResolver (/app/node_modules/next/dist/server/api-utils/node.js:372:15) {
  errno: -111,
  code: 'ECONNREFUSED',
  syscall: 'connect',
  address: '127.0.0.1',
  port: 3306,
  fatal: true

from manage-my-damn-life-nextjs.

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

Do DB_PASS and MYSQL_ROOT_PASSWORD have to match ? (they do in my config)

Yes they do have to match.

A new container of mysql is created for MMDL if you're using docker compose.

Please reset the following variables to these values:

DB_USER: root
DB_PASSWORD: [same as MYSQL_ROOT_PASSWORD]
DB_HOST: db
DB_NAME: [same as MYSQL_DATABASE]

Basically your app takes the reference of db which is also defined in the docker compose file. This is used to create a mysql container with just one user root, and one database which is specified in MYSQL_DATABASE.

If you're trying to connect to your own database, you should preferably try the "Without Docker Compose" set of instructions here:

https://manage-my-damn-life-nextjs.readthedocs.io/en/latest/install/Docker/

from manage-my-damn-life-nextjs.

AeliusSaionji avatar AeliusSaionji commented on May 27, 2024

I just tried to set this up today, and I'm getting an error on the install page.

manage-my-damn-life-nextjs-app-1  | Error: 'sharp' is required to be installed in standalone mode for the image optimization to function correctly. Read more at: https://nextjs.org/docs/messages/sharp-missing-in-production

from manage-my-damn-life-nextjs.

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

@AeliusSaionji

I have opened a new issue regarding this #51.

Could you please respond there?

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.