bigfive-web icon indicating copy to clipboard operation
bigfive-web copied to clipboard

Add a dockerfile for easier development

Open maccyber opened this issue 3 years ago • 4 comments

ref https://github.com/rubynor/bigfive-web/issues/102 I also needed to do some tricks to bypass the 50mb limit on vercel functions but I think they have no use for a PR right now

maccyber avatar Oct 06 '22 18:10 maccyber

Hello. Would you be interested in doing this with docker-compose instead of plain docker?

karate avatar Oct 07 '22 07:10 karate

Sure :-)

maccyber avatar Oct 07 '22 09:10 maccyber

I also needed to do some tricks to bypass the 50mb limit on vercel functions but I think they have no use for a PR right now

I also have some tricks already in my sleeve @maccyber, if you remove the skip questions as dev in the index and store the files goes below 50mb but again no use for a PR

  • store/index.js Screen Shot 2022-10-13 at 10 55 33

  • pages/test.vue Screen Shot 2022-10-13 at 10 55 51

I also built a dockerfile / compose to work in a container, but as mentioned in other issues the API folder project does not work outside vercel, so you need at least a first deploy so your local can use those functions in vercel cloud, or point those to the actual running rubynor backend, but if you do that there is no use for a db since you are using rubynor db too.

I yall like I can open the Dockerfile PR, since is already done in my local.

Rovel avatar Oct 13 '22 14:10 Rovel

Running the app locally, I noticed that results are still being sent and fetched from/to https://bigfive-test.com. This seems to be hardcoded in https://github.com/rubynor/bigfive-web/blob/master/nuxt.config.js#L293

I'd suggest to first fix the app to respect the process.env.NODE_ENV variable as it is suggested here: https://github.com/rubynor/bigfive-web/blob/master/lib/helpers.js#L36 in a different PR.

As a result, I'm committing a docker-compose file only for the container with the node image, as there is no point in starting a mongo container if it's not being used. If you don't want to merge this, please feel free to close the PR.

karate avatar Oct 14 '22 09:10 karate