strapi / strapi-docker

Install and run your first Strapi project using Docker
https://strapi.io
MIT License
1.16k stars 447 forks source link

running 'examples/mysql/docker-compose.yml' failing #254

Closed hilyin closed 3 years ago

hilyin commented 3 years ago

error:

strapi    | 2020-10-09T06:18:34.632029136Z 
strapi    | 2020-10-09T06:18:34.632118626Z ⏳ Testing database connection...
strapi    | 2020-10-09T06:18:34.632142138Z It might take a minute, please have a coffee ☕️
strapi    | 2020-10-09T06:19:45.166670263Z internal/modules/cjs/loader.js:589
strapi    | 2020-10-09T06:19:45.166729690Z     throw err;
strapi    | 2020-10-09T06:19:45.166739660Z     ^
strapi    | 2020-10-09T06:19:45.166744154Z 
strapi    | 2020-10-09T06:19:45.166781924Z Error: Cannot find module '/tmp/strapia227f38a0cf7/node_modules/mysql/package.json'
strapi    | 2020-10-09T06:19:45.166791006Z     at Function.Module._resolveFilename (internal/modules/cjs/loader.js:587:15)
strapi    | 2020-10-09T06:19:45.166795355Z     at Function.Module._load (internal/modules/cjs/loader.js:513:25)
strapi    | 2020-10-09T06:19:45.166799229Z     at Module.require (internal/modules/cjs/loader.js:643:17)
strapi    | 2020-10-09T06:19:45.166802997Z     at require (internal/modules/cjs/helpers.js:22:18)
strapi    | 2020-10-09T06:19:45.166806762Z     at shell.exec (/usr/local/lib/node_modules/strapi/node_modules/strapi-generate-new/lib/before.js:321:26)
strapi    | 2020-10-09T06:19:45.166810687Z     at /usr/local/lib/node_modules/strapi/node_modules/strapi-generate-new/node_modules/shelljs/src/exec.js:204:9
strapi    | 2020-10-09T06:19:45.166814578Z     at ChildProcess.exithandler (child_process.js:296:5)
strapi    | 2020-10-09T06:19:45.166818324Z     at ChildProcess.emit (events.js:182:13)
strapi    | 2020-10-09T06:19:45.166823160Z     at ChildProcess.EventEmitter.emit (domain.js:441:20)
strapi    | 2020-10-09T06:19:45.166827153Z     at maybeClose (internal/child_process.js:970:16)
strapi exited with code 1
alexandrebodin commented 3 years ago

Hello this log isn't really helpful as you don't share steps to reproduce. From what I am seeing you just need to yarn add the mysql package. I'm going to close this util you update the description ;)

hilyin commented 3 years ago

steps to repro:

docker-compose up

I am supposed to yarn or npm add inside a container?

or outside on the host system? which would defeat the purpose of using docker no?

alexandrebodin commented 3 years ago

docker compose up of what ? what is your setup and config ?

hilyin commented 3 years ago

the mysql docker-compose.yml

config? this is first run.

alexandrebodin commented 3 years ago

Are you running an existing project or waiting for it to generate ?

hilyin commented 3 years ago

brand new project, i am expecting strapi to start a fresh install w/ mysql service attached. but it fails on that yarn/npm package inside the container.

alexandrebodin commented 3 years ago

How did you make that install ? by default it is using sqlite.

hilyin commented 3 years ago

How did you make that install ? by default it is using sqlite.

Sir, I am using your docker-compose.yml provided in the repo. examples/mysql/docker-compose.yml

I literally just run docker-compose up with that file, expecting it to handle installing node modules itself within the container it requires them. I am just trying to setup a brand new install with your provided docker-compose.yml.

hilyin commented 3 years ago

I gotta say, I am really frustrated with the response I got from this team.

Please understand your file examples/mysql/docker-compose.yml in your repo is broken. It needs to be repaired so when you start a fresh instance it actually installs and sets up properly. I am beyond frustrated with trying to set this up.

The fact that this ticket was immediately closed shows how supportive your "support" team is.

alexandrebodin commented 3 years ago

Hello @hilyin until your last comment I didn't know which docker-compose file you were using.

Now, I just tried running the ./examples/mysql/docker-compose.yml configuration whithout bugs so I will need a bit more details to help you.

To help our community the best we triage the tickets but still answer to them. As you can see you didn't have to wait for any answer until the weekend (yes maintainers do get to have a life too ;))

A kind reminder that you are using an open source project and not paying for a support service. Rest assured we do our best to help out everyone in our community in a timely fashion. :) Finally I will point you to our code of conduct here so you are aware of the expected bahaviors on our repositories.

Have a great day !

hilyin commented 3 years ago

it was in the subject line of this issue the entire time. i’ve moved onto an alternate solution. good day.