[SUPPORT] OpenEats - CorneliousJD Repo


128 posts in this topic Last Reply

Recommended Posts

Thank you for the detailed write up. I was trying to test this out and everything is working fine but I noticed it was having issues saving when my ingredients/directions had foreign characters (Chinese characters or emojis). I figured out by changing the database collation to utf8mb4_bin it resolved all the issues but it did not change the table collation if it was created previously. My suggestion is to make the default collation utf8mb4_bin when creating the database in MariaDB. This would save others headache in the future! Hope this helps.

Edited by bobokun
Link to post
  • Replies 127
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

You probably haven't rebuild the container from scratch, and it was pulling it from cache. You can try using docker build with --no-cache --pull   I believe the NODE_LOCALE fix would also re

About OpenEats is a recipe management site that allows users to create, share, and store their personal collection of recipes. The usage for the app is intended for a single user or a small

Interesting. Yeah it just be something with that. Try blowing out the whole open eats container too when you make the DB over again. Make sure you assign a user with all rights on that db (or use root

Posted Images

4 hours ago, bobokun said:

Thank you for the detailed write up. I was trying to test this out and everything is working fine but I noticed it was having issues saving when my ingredients/directions had foreign characters (Chinese characters or emojis). I figured out by changing the database collation to utf8mb4_bin it resolved all the issues but it did not change the table collation if it was created previously. My suggestion is to make the default collation utf8mb4_bin when creating the database in MariaDB. This would save others headache in the future! Hope this helps.

Thanks, I had to do this as well. I believe this is more to do with MariaDB defaults, which this container doesn't change at the moment.

 

Additionally, I had to overwrite /etc/nginx/conf.d with my own one in order to set the client_max_body_size

 

A default of 1MB is kind of very small for images.

Link to post

Hey,

 

I'm a noob when it comes to Databases, so this question might be dumb:

 

I already use the MariaDB from linuxserver for my Nextcloud container. Can I just add a second database to the same MariaDB container?

 

Much appreciated

Link to post
1 hour ago, Kenjilord said:

Can I just add a second database to the same MariaDB container?

Can you, yes. Should you? Well, that depends on your abilities. You may find yourself needing to become much more proficient in databases. If you spin up a second mariadb with a new name, ports and appdata location, then it's trivial to blow away the whole database file and start over. If you use the same database container, and something messes up, you will need to learn how to edit the database to remove the offending tables without disturbing your existing NC database tables.

 

If you enjoy learning and tinkering, use the same DB. If you just want to make it work with the least possible hassle if something goes wrong, set up a new DB.

Link to post
15 hours ago, BrambleGB said:

Thanks, I had to do this as well. I believe this is more to do with MariaDB defaults, which this container doesn't change at the moment.

 

Additionally, I had to overwrite /etc/nginx/conf.d with my own one in order to set the client_max_body_size

 

A default of 1MB is kind of very small for images.

How do you go about changing this? Did you bash into the open eats container and edit the default.conf file in /etc/nginx/conf.d? What text editor did you use to do this since the container doesn't seem to have nano installed.. Also will the changes you make stay once the container gets updated?

Link to post
4 minutes ago, bobokun said:

How do you go about changing this? Did you bash into the open eats container and edit the default.conf file in /etc/nginx/conf.d? What text editor did you use to do this since the container doesn't seem to have nano installed.. Also will the changes you make stay once the container gets updated?

I bashed in, copied the default.conf, and create my own default.conf (with the added client_max_body_size inside the http {} braces).
Then I mounted that folder (e.g. /mnt/user/configs/openeats/) to /etc/nginx/conf.d/ and restarted the container.

Ideally nginx can be removed, as people already run it separately.
You also have to remember to change it if you're running an extra nginx container (e.g. the LetsEncrypt one)

Link to post
4 hours ago, Kenjilord said:

Hey,

 

I'm a noob when it comes to Databases, so this question might be dumb:

 

I already use the MariaDB from linuxserver for my Nextcloud container. Can I just add a second database to the same MariaDB container?

 

Much appreciated

I actually use the same container, but like @jonathanm said, you could also spin up a second MariaDB instance with a different name and different appdata.

 

I personally just use the same container, I find using a program called HeidiSQL on Windows makes it easy to connect to my MariaDB instance and add/drop databases and tables, and add users if needed too, or Adminer (which is it's own docker container in CA) can be used to do the same as well, it gives you a nice GUI to work with instead of command line for managing the databases. 

 

If you're comfortable with a little tinkering and learning along the way, you can use the same MariaDB you use for Nextcloud, otherwise just install the same container again and called it mariadb-openeats and give it an appdata with the same name and you'd be off to the races in no time!

Link to post
19 minutes ago, BrambleGB said:

I bashed in, copied the default.conf, and create my own default.conf (with the added client_max_body_size inside the http {} braces).
Then I mounted that folder (e.g. /mnt/user/configs/openeats/) to /etc/nginx/conf.d/ and restarted the container.

Ideally nginx can be removed, as people already run it separately.
You also have to remember to change it if you're running an extra nginx container (e.g. the LetsEncrypt one)

Thank you! I did exactly as you recommended and it worked perfectly. Now I don't have a limit on the image size anymore. :)

Link to post

Hello,

 

I was able to easily create a Test recipe where everything was written as "test". 

 

However, when i started entering longer recipes with 1/2 symbols it just hangs when i click save and it never saves. 

 

Do i need to convert the database to utf8mb4_bin? not sure how to do that with MariaDB.

 

thanks!

Link to post
48 minutes ago, Akash said:

Hello,

 

I was able to easily create a Test recipe where everything was written as "test". 

 

However, when i started entering longer recipes with 1/2 symbols it just hangs when i click save and it never saves. 

 

Do i need to convert the database to utf8mb4_bin? not sure how to do that with MariaDB.

 

thanks!

Is your ALLOWED_HOST variable set to *? If not set it back to * and try again, also see known issues about linked recipies as well, it is known to hang currently when trying to link a recipe.

 

1/2 is supported just fine but ½ (the actual symbol) is not.

 

e.g. the following are fine

0.5 cup water

1/2 cup water

 

the following is NOT

½ cup water

 

The last one will not work becuase it cannot proccess that as a proper quantity. 

Link to post
5 minutes ago, repomanz said:

Hey dev - any future plans to roll in the db / setup within same container?

I am not the dev, see first post that describes this request already ;) 

 

The dev has already touched on working on that but it's still not working correctly at this time.

I would just recommend biting the bullet and firing up a MariaDB container, it's not too tough to do.

Edited by CorneliousJD
Link to post

Btw @CorneliousJD, you are using a rather old build of the UI and API (pre december 2018), which is causing the admin page issue.

 

It was fixed by the author on 31 Dec 2018 (see https://github.com/open-eats/OpenEats/issues/74#issuecomment-447832673)

 

Even though your docker file says it pulls from master, it hasn't been rebuilt in a long time.

The nginx, node and yarn versions are also quite old, and all the custom setup in your dockerfile can be replaced by simply 

apk add --update nodejs
apk add --update yarn

 

As the code itself also uses somewhat outdated packages, I had to fork it, update it and make my own dockerfile based off it.

It also ended up saving about 50MB on the built image.

Edited by BrambleGB
Link to post
3 hours ago, BrambleGB said:

Btw @CorneliousJD, you are using a rather old build of the UI and API (pre december 2018), which is causing the admin page issue.

 

It was fixed by the author on 31 Dec 2018 (see https://github.com/open-eats/OpenEats/issues/74#issuecomment-447832673)

 

Even though your docker file says it pulls from master, it hasn't been rebuilt in a long time.

The nginx, node and yarn versions are also quite old, and all the custom setup in your dockerfile can be replaced by simply 


apk add --update nodejs
apk add --update yarn

 

As the code itself also uses somewhat outdated packages, I had to fork it, update it and make my own dockerfile based off it.

It also ended up saving about 50MB on the built image.

Interesting, I guess I'm not sure why it would be pulling such an old build when it's supposed to pull from master. 

 

Mind sharing your dockerhub repo? I can change my pull to that and if it works successfully I can just update the template in CA to pull from yours instead :)

Link to post
6 hours ago, CorneliousJD said:

Interesting, I guess I'm not sure why it would be pulling such an old build when it's supposed to pull from master. 

 

Mind sharing your dockerhub repo? I can change my pull to that and if it works successfully I can just update the template in CA to pull from yours instead :)

Sorry, just got around to it.

https://hub.docker.com/repository/docker/bramblegb/openeats/general

https://github.com/jzyrobert/openeats-docker

 

Do note that this is based off a personal fork right now, not the original one.

Link to post
On 5/29/2020 at 1:39 AM, CorneliousJD said:

Is your ALLOWED_HOST variable set to *? If not set it back to * and try again, also see known issues about linked recipies as well, it is known to hang currently when trying to link a recipe.

 

1/2 is supported just fine but ½ (the actual symbol) is not.

 

e.g. the following are fine

0.5 cup water

1/2 cup water

 

the following is NOT

½ cup water

 

The last one will not work becuase it cannot proccess that as a proper quantity. 

Hi @CorneliousJD. If you set openeats database collation to "utf8_general_ci" you can use "½ cup water".

Link to post
On 5/29/2020 at 2:58 PM, BrambleGB said:

Sorry, just got around to it.

https://hub.docker.com/repository/docker/bramblegb/openeats/general

https://github.com/jzyrobert/openeats-docker

 

Do note that this is based off a personal fork right now, not the original one.

 

Thanks! Do you happen to know why the other one wasn't actually pulling from an updated master file? I can't seem to figure that out. I'd like to fork just the dockerfile if I can and not have to maintain a separate OpenEats repo itself.

 

On 5/31/2020 at 12:22 PM, w^w said:

Hi @CorneliousJD. If you set openeats database collation to "utf8_general_ci" you can use "½ cup water".

Thanks. Although I do not believe the serving size changes will be able to parse that character and change it accordingly? If it does great, otherwise you would still need to stick with 1/2 anyways.

Link to post

Digging the app! Thanks very much.

 

Is there a way to disable or make optional some of the required fields when creating a recipe? eg: prep time, cooking time, etc.

I don't care to put those in every time :)

 

Thanks!

Link to post

Thanks for the template it is very good and works so far.

But I have one question:
The changeover to German with the variable NODE_LOCALE=de doesn't work. It is always English.

 

What am I doing wrong?

 

API_PORT=8000
NODE_LOCALE=de
NODE_VERSION=8.11.1
HOSTNAME=d9526bc81b9f
YARN_VERSION=1.5.1
SHLVL=1
HOME=/root

 

 

bild1.png

Link to post
18 hours ago, itlists said:

Digging the app! Thanks very much.

 

Is there a way to disable or make optional some of the required fields when creating a recipe? eg: prep time, cooking time, etc.

I don't care to put those in every time :)

 

Thanks!

That would be something you'd need to check in with the OpenEats developers themselves on to see if it's soemthing that can easily be modified somewhere. I don't have a way to set that though from the container side personally, sorry!

 

16 hours ago, Thorsten said:

Thanks for the template it is very good and works so far.

But I have one question:
The changeover to German with the variable NODE_LOCALE=de doesn't work. It is always English.

 

What am I doing wrong?

 

That's odd, I never tried another langauge before because I don't know any, but the NODE_LOCALE variable was taken directly from here:

https://openeats.readthedocs.io/en/feature-doc-update/Setting_up_env_file/ (see the very bottom)

 

Also the Dockerfile that this is built from also includes the NODE_LOCALE variable so it should be working.

Does any other language work when you try to change it to anything other than English? Or does it always show as English?

Link to post
On 5/28/2020 at 7:48 AM, BrambleGB said:

I bashed in, copied the default.conf, and create my own default.conf (with the added client_max_body_size inside the http {} braces).
Then I mounted that folder (e.g. /mnt/user/configs/openeats/) to /etc/nginx/conf.d/ and restarted the container.

Ideally nginx can be removed, as people already run it separately.
You also have to remember to change it if you're running an extra nginx container (e.g. the LetsEncrypt one)

 

On 5/28/2020 at 8:08 AM, bobokun said:

Thank you! I did exactly as you recommended and it worked perfectly. Now I don't have a limit on the image size anymore. :)

Can either of you, or anyone for that matter, provide a step by step guide on how to bash in and made these modifications? I am pretty new to using linux so the commands are kinda foreign to me. I found the relvant "client_max_body_size" within my letsencrypt docker but I cannot figure out how to make it happen in this container.

Link to post
18 hours ago, CorneliousJD said:

Also the Dockerfile that this is built from also includes the NODE_LOCALE variable so it should be working.

Does any other language work when you try to change it to anything other than English? Or does it always show as English?

Yes, English is always shown even if I try the other two languages French and Spanish. Also when I rename the de.json file under locales to en.json for the English language file.

I tried these changes directly in the container.
But nothing helps.

Link to post
On 6/1/2020 at 8:15 PM, CorneliousJD said:

Thanks! Do you happen to know why the other one wasn't actually pulling from an updated master file? I can't seem to figure that out. I'd like to fork just the dockerfile if I can and not have to maintain a separate OpenEats repo itself.

You probably haven't rebuild the container from scratch, and it was pulling it from cache. You can try using docker build with --no-cache --pull

 

I believe the NODE_LOCALE fix would also require a rebuild? Since the environment variables are captured by webpack at build time, which then isn't updated if the user changes it.

 

10 hours ago, Civrock said:

 

Can either of you, or anyone for that matter, provide a step by step guide on how to bash in and made these modifications? I am pretty new to using linux so the commands are kinda foreign to me. I found the relvant "client_max_body_size" within my letsencrypt docker but I cannot figure out how to make it happen in this container.

1. Create the folder where you want to put the config file. I will use "/mnt/user/configs/openeats" Open the unraid console and type "mkdir -p FOLDER_NAME"

2. Create the "default.conf" file inside that folder. In the unraid console, type "touch FOLDER_NAME/default.conf"

3. Copy my current configuration file from https://pastebin.com/CaPikhGr to a text editor and set the client_max_body_size (im using 40MB for no reason)

4. Copy the content to the default.conf file you created. You can use vi, or echo, or cat. Quick way with echo is running the command "echo "PASTE THE CONTENT HERE, DON'T FORGET QUOTATION MARKS" > FOLDER_NAME/default.conf" 

5. Edit the openeats container, select "Add another Path, Port, Variable, Label or Device", choose path. Name doesn't matter, container path is "/etc/nginx/conf.d/", and host path is "FOLDER_NAME"

6. Restart the container and the new configuration should work.

 

You may also have to edit the LetsEncrypt configuration, but there are other tutorials for that.

  • Like 1
  • Thanks 1
Link to post
6 hours ago, Thorsten said:

Yes, English is always shown even if I try the other two languages French and Spanish. Also when I rename the de.json file under locales to en.json for the English language file.

I tried these changes directly in the container.
But nothing helps.

I was able to get it working in German (see attached image).

I am using my own dockerfile though and had to rebuild the image with NODE_LOCALE=de

 

Let me know if you need help with that, or I can push my own forked version for you.

 

chrome_0twIiBscxd.png

Link to post
3 hours ago, BrambleGB said:

You probably haven't rebuild the container from scratch, and it was pulling it from cache. You can try using docker build with --no-cache --pull

 

I believe the NODE_LOCALE fix would also require a rebuild? Since the environment variables are captured by webpack at build time, which then isn't updated if the user changes it.

 

1. Create the folder where you want to put the config file. I will use "/mnt/user/configs/openeats" Open the unraid console and type "mkdir -p FOLDER_NAME"

2. Create the "default.conf" file inside that folder. In the unraid console, type "touch FOLDER_NAME/default.conf"

3. Copy my current configuration file from https://pastebin.com/CaPikhGr to a text editor and set the client_max_body_size (im using 40MB for no reason)

4. Copy the content to the default.conf file you created. You can use vi, or echo, or cat. Quick way with echo is running the command "echo "PASTE THE CONTENT HERE, DON'T FORGET QUOTATION MARKS" > FOLDER_NAME/default.conf" 

5. Edit the openeats container, select "Add another Path, Port, Variable, Label or Device", choose path. Name doesn't matter, container path is "/etc/nginx/conf.d/", and host path is "FOLDER_NAME"

6. Restart the container and the new configuration should work.

 

You may also have to edit the LetsEncrypt configuration, but there are other tutorials for that.

Thank you so much for this!

Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.