Giter Club home page Giter Club logo

openeats's People

Contributors

adaptiman avatar hertfelder avatar hoijui avatar jpartain89 avatar kinryuuu avatar madwalnut avatar mrnuggelz avatar rustymyers avatar ryannoelk avatar stingrayza avatar thomaspreece avatar ximmix avatar zimeon- avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

openeats's Issues

Change password

I created an openeats instance for close family, but I don't know exactly how to give them access. I created a test user and I have to input a password at that point. If I login with that user, which is a common user, they cannot change their own password (I get a Please enter the correct username and password for a staff account. error if I try the /admin/ path)
I don't see any way of sending recovery passwords email either, so that's also not an option.
Is there a way to change/recover password at the moment?

Attempting clean install

I'm attempting to follow the docs for a clean install, but having issues getting things running.

After cloning the repo and changing into the OpenEats directory I'm copying the docker-prod.override.yml and env_prod.list from the samples folder. I'm running a Nginx reverse proxy on port 80 already, so I have updated the docker-prod.override.yml with:

version: '2.3'
services:
  nginx:
    ports:
      - "7000:80"

I'm making the following changes to the env_prod.list file:

...
ALLOWED_HOST=myers.isa-geek.org
HTTP_X_FORWARDED_PROTO=true

# Node config
NODE_ENV=production
NODE_URL=localhost:8080
NODE_PORT=8080
NODE_API_URL=http://myers.isa-geek.org
NODE_LOCALE=en

I've got my nginx file set to redirect as follows:

	location /openeats/ {
                proxy_set_header Host $http_host;
                proxy_set_header X-Real-IP $remote_addr;
                proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
                proxy_set_header X-Forwarded-Proto $scheme;
                proxy_pass http://10.0.1.10:7000;
        }

Creating a super user works as expected, as far as I can tell. I can't seem to browse the django admin interface at 10.0.1.10:8000.

It doesn't seem the access to the api container is working to load recipes, either:

docker-compose run --rm api bash
ERROR: build path /opt/OpenEats/openeats-web either does not exist, is not accessible, or is not a valid URL.

I can load the site at http://10.0.1.10:7000, but no recipes are shown because it's unable to reach the api, net::ERR_CONNECTION_REFUSED in the Chrome Console.

Visiting the site through the hostname https://myers.isa-geek.org/openeats/ shows GET https://myers.isa-geek.org/bundle.js net::ERR_ABORTED in the console.

Checking the docker logs I see 2018-02-07 3:25:52 139967316383488 [Warning] Access denied for user 'root'@'localhost' (using password: NO) repeated in the openeats_db_1 container every few seconds.

Sorry for the long post, but I hope that including all this info will show a glaring hole in my configs. I think I should be trying from this repo and not the old one? I'm still playing around trying to get things to work, but if I'm honest I'm a bit lost in the interaction between all the containers and what is appropriate for configs in my scenario. Thanks in advance!

Degree Character is causing 500 Internal Server Error

I tried to create a recipe with the following line (Copy and pasted from a recipe) and kept getting a 500 Internal Server Error. When I removed the degree characters it was Okay.

(Put in the directions)
Preheat oven to 375˚F/190˚C .

Here is the chrome console output:
VM270:1 POST https://recipes.{domain}.net/api/v1/recipe/recipes/ 500 (Internal Server Error)
(anonymous) @ VM270:1
u._end @ client.js:772
u.end @ client.js:676
(anonymous) @ request-base.js:238
r.then @ request-base.js:237
(anonymous) @ RecipeFormActions.js:96
(anonymous) @ index.js:8
dispatch @ applyMiddleware.js:35
(anonymous) @ RecipeFormActions.js:45
(anonymous) @ index.js:8
(anonymous) @ bindActionCreators.js:3
a.submit @ RecipeForm.js:39
b @ react-dom.production.min.js:36
invokeGuardedCallback @ react-dom.production.min.js:35
invokeGuardedCallbackAndCatchFirstError @ react-dom.production.min.js:35
v @ react-dom.production.min.js:36
executeDispatchesInOrder @ react-dom.production.min.js:38
j @ react-dom.production.min.js:46
S @ react-dom.production.min.js:46
k @ react-dom.production.min.js:46
processEventQueue @ react-dom.production.min.js:49
handleTopLevel @ react-dom.production.min.js:57
x @ react-dom.production.min.js:43
batchedUpdates @ react-dom.production.min.js:190
_ @ react-dom.production.min.js:41
E @ react-dom.production.min.js:41
batchedUpdates @ react-dom.production.min.js:42
dispatchEvent @ react-dom.production.min.js:45

It says in this part of the code (It highlights n.apply(e, arugments)):

        function(t) {
            var e = this
              , o = r(t);
            return o && e.addEventListener("loadend", function() {
                s({
                    requestID: o,
                    statusCode: e.status
                })
            }),
            n.apply(e, arguments)
        }

Issue: Recipe with parenthesis in the name has bug in Browse Recipe Page

[Edit] After some more playing it seems the issue might be with recipes that don't have an image.

If a recipe has a parenthesis in the name it creates a bug in the browse recipe page making an incomplete line of recipes (See Image below).

Removing the parenthesis from title in the editor doesn't seem to recover from the issue. It takes deleting the recipe and recreating without the parenthesis to recover from the issue.

Server:
I'm working on what should be latest Docker Image (Installed this past weekend 5/26/18)
Linux mint 4.10.0-42-generic #46~16.04.1-Ubuntu SMP Mon Dec 4 15:57:59 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

Browsing Computer:
Google Chrome: Version 66.0.3359.181 (Official Build) (64-bit)
Windows 10 Pro Version 1803

image

List: Breakpoint for buttons on small devices

Hi,

on small devices, the buttons below the grocery list overlap as it can be seen in the screenshot.
Best way to fix this would probably be to display the label, the filters and the completed button stacked underneath the other, when a certain breakpoint is reached

openeats-1

Pictures appear nowhere (news or recipes)

I recently installed openeats on my debian server. Firstly, thanks for your work, it's brilliant and it's functionalities are well above the competition i found.

My problem is related to showing images anywhere in the app.
The upload works with no errors shown or significant logs in any of the containers.
When i check in django admin, the image is linked to the recipe.
However when i open the news feed or recipe, the picture does not load (still no errors of logs to be seen)
Any ideas for the origin of the problem? The repository is in my www/Openeats directory, could i have a rights problem?

Import from URL

Want to add import from URL functionality into OpenEats. Thinking of having a button under the "URL Source of the recipe" which says "Import details from URL".

This repo is looking the most favorable for the functionality https://github.com/lukeasrodgers/hangry, for example an older version of the code produces: http://hangryingreedytest.herokuapp.com/?recipe_url=https%3A%2F%2Fwww.bbcgoodfood.com%2Frecipes%2F691639%2Fsatay-chicken-pieces which looks pretty good to me. The only issue is that it is in ruby so I'm wondering should I submit a PR to the API component or should I keep it a separate docker service (new component under open-eats) and then have the API query that service and forward the request onto the frontend?

User Reviews

comments TBD. Generally I want to replace the ratings field in the recipe model with a new model that holds a rating, comment, comment date, edited date, etc...

Default image spacing is broken

If a recipe doesn't have an image, a default one is provide. Sometimes there is some weirdness with the sizing of a default image causing the layout to break. I thought I had fix this issue but after looking at screenshots, I don't think I have.

See: #38

Ingredients count/size/measurement are not displayed in the ui

Just fired up openeats following the -prod instructions. I added the bare minimum of a recipe to check this project out. I've entered the ingredients following the tooltip help:

8 bone-in, skin-on chicken thighs
5 chickens
1.5 cups of water

but none of the count/size numbers are being rendered in the webpage:
screenshot-2018-4-15 openeats
The preview link correctly displays the numbers:
screenshot-2018-4-15 openeats 1

The api response looks like:

{
  "id": 1,
  "photo": null,
  "photo_thumbnail": null,
  "ingredient_groups": [
    {
      "id": 6,
      "title": "",
      "ingredients": [
        {
          "id": 11,
          "numerator": 1,
          "denominator": 1,
          "measurement": "bone-in,",
          "title": "skin-on chicken thighs"
        },
        {
          "id": 12,
          "numerator": 1,
          "denominator": 1,
          "measurement": null,
          "title": "chickens"
        },
        {
          "id": 13,
          "numerator": 1,
          "denominator": 1,
          "measurement": "cups",
          "title": "of water"
        }
      ]
    }
  ],
  "tags": [],
  "subrecipes": [],
  "pub_date": "2018-04-15",
  "update_date": "2018-04-15",
  "username": "manny",
  "title": "Lemon Butter Chicken",
  "slug": "lemon-butter-chicken",
  "info": "Easy crips-tender chicken with the creamiest lemon butter sauce ever.",
  "directions": "Do it",
  "source": "",
  "prep_time": 10,
  "cook_time": 40,
  "servings": 8,
  "rating": 0,
  "public": true,
  "author": 1,
  "cuisine": 3,
  "course": 2
}

OpenEats Doesn't Auto-Start at System Boot/Restart

(This isn't so much an issue, as a documentation enhancement request)

It appears that, by default, OpenEats will not auto-start whenever the Docker host is booted, and/or when Docker is fired up.

I found that I could cause auto-starting to happen correctly (at least for me) with the following definitions in my docker-prod.override.yml file:

docker-prod.override.yml

version: '2.3'
services:
  nginx:
    ports:
        - "8000:80"
    restart: always
  api:
    restart: always
  web:
    restart: on-failure
  db:
    restart: always

Notes/Comments

  1. The ports: stanza for nginx represents what I need in my system. Obviously, you'll want to customize this to your particular needs, assuming you require it at all.
  2. I found that under normal circumstances, the web container appears to be a "run-once" kind of thing. When you start OpenEats it will fire up, and terminate (presumally successfully). As this seems to be desired behaviour I set it to restart: on-failure instead of always as is done for the other containers.

Submitted in the hopes that this helps others looking to implement similar auto-start behaviour.

Serve Static via the node container

There should be a command that users can run in order to serve the static content from the docker container. The container can run using express and just serve from the build dir.

3rd party tracking app support

I want this code to have support for user tracking and error tracking via 3rd party apps.

  • Sentry/Rollbar
  • Google Analysis

Recipe Course/Cuisine/Rating Doesn't Show up in Filters on Browse Screen until Refresh

It's a small bug, but after adding a recipe to a previously empty course (e.g. Breakfast) that course doesn't show up in the Filters on the Browse Screen until the user manually refreshes the page (F5 or otherwise).

Same thing for a cuisine and ratings.

(I'm just adding a bunch of recipes and none of the new courses showed up in the filters until I refreshed)

Create a django like admin interface in react

We don't need many of the features that the admin panel has, just the following:

  • CRUD operations on users.
  • CURD operations on courses.
  • CURD operations on cuisines.

This will also prevent the API from serving static.

Sharing grocery list is not working

Should shared grocery lists work already ?
I tried sharing a grocery list with a second user (in django management area), but it resulted in an error (with an underlying http 500 response).
Also tried adding an entry into table list_groceryshared directly, but it had no effect

Error during net-new Docker & OpenEats Install: MariaDB "Access denied for user 'root'@'localhost'"

Environmental Details

  • Host Environment: VMWare ESXi 6.7 (fresh VM)
  • Host O/S: Fedora 28 64-bit (freshly-installed OS)
  • Docker Version: docker-ce-18.06.1.ce-3.fc28
  • Docker Compose Version: 1.22.0

Problem Description

Hello there. I am in the process of installing OpenEats into a net-new Docker host. I.e. I first installed Docker in a fresh VM, got it up and running, and then installed Portainer before proceeding directly to the OpenEats install guide. No other images/containers were installed prior, with the exception of Portainer.

The installs of Fedora, Docker, Portainer and OpenEats appeared to all complete without error. For OpenEats, I completed all steps up to and including adding course/cuisine data in First Time Setup.

When I then try hitting the web UI, I get a blank screen. I noticed the following errors in the openeats_db-1 logs (this appears after what looks like a normal initialization):

2018-08-22 23:48:28 8 [Warning] Access denied for user 'root'@'localhost' (using password: NO)

I then manually verified the issue by consoling into openeats_db_1 and running the following (testing root login with & without supplied password):

root@777d0228231b:/# mysql -u root
ERROR 1045 (28000): Access denied for user 'root'@'localhost' (using password: NO)
root@777d0228231b:/# mysql -u root -p
Enter password:
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 58
Server version: 10.3.9-MariaDB-1:10.3.9+maria~bionic mariadb.org binary distribution

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [(none)]>

Workaround

To work around this, I created ~root/.my.cnf (perms 0600) with the following content:

[client]
user=root
password=root
host=localhost

... wherein the specified password corresponds what I believe the default for OpenEats is. When I re-ran the quick-start.py script, this time I was able to hit the login page for OpenEats.

Questions

  1. Is it possible I misconfigured something when installing OpenEats? (See my config below)
  2. Or, is there an expectation that a MariaDB container already exists, has been configured, and runs correctly?
    In both of these cases, I suspect a simple documentation change might suffice to rectify.

Thank you very much for a very useful recipe app!

Test Configuration

env_prod.list

MYSQL_DATABASE=openeats
MYSQL_ROOT_PASSWORD=root

# Django config
API_URL=0.0.0.0:8000
API_PORT=8000
DJANGO_SECRET_KEY=kshadkhskjSECRET-KEYkdjfsfkhk3h4hsdd
DJANGO_SETTINGS_MODULE=base.settings
DJANGO_DEBUG=False
ALLOWED_HOST=docker.<example.com>
HTTP_X_FORWARDED_PROTO=true

# Node config
NODE_ENV=production
NODE_URL=localhost:8080
NODE_API_URL=http://docker.<example.com>/
NODE_LOCALE=en

docker-prod.override.yml

version: '2.3'
services:
  nginx:
    ports:
        - "8000:80"

404 error on refresh

I'm getting 404 error when refreshing any page or entering link manually (for ex: @https://open-eats.github.io/recipe/1 ) So this is reproducable on https://open-eats.github.io.

Since I dont use nginx, don't know how to fix it, but in apache with this simple rewrite rule for public-ui directory you can use the links and the browser refresh.

<Directory "<path>/public-ui">
           RewriteEngine On
           RewriteBase /
           RewriteRule ^index\.html$ - [L]
           RewriteCond %{REQUEST_FILENAME} !-f
           RewriteCond %{REQUEST_FILENAME} !-d
           RewriteRule . /index.html [L]
           ... 
</Directory >

Update: Maybe something like this will do the trick (not tested)

server {
    listen 80;
    server_name localhost;

    location / {
        root /var/www/html/openeats-static/public-ui;
        try_files $uri $uri/ **=404**;
    }
    ...

Returning to the Create tab retains information from old recipe

Issue: When I create a recipe and successfully submit it to the site, returning to the Create tab retains the information I filled out in each field. If I delete this text and try to input a new recipe, the page gives the error "Recipe failed to save. Please try again." with no indication on if a field was incorrectly filled out or otherwise.

How to replicate:
-Create recipe and click Submit recipe to successfully save to the site.
-Click on the Create tab at the top.
-Notice information from the recipe is still present.
image
-Delete the information in each field and reinput new information (I've done this where only one field is edited, and where all fields are changed, with no change in behavior). Click Save or Submit and the page produces "Recipe failed to save. Please try again." at the top.
image
-New recipe does not save in any manner, and the page has to be refreshed to clear out every field and be able to successfully submit new recipes.

My more programming savvy SO provided me with this information:

When creating the first recipe, it sends a POST request to https://eats.example.com/api/v1/recipe/recipes/
When creating the second recipe, it sends a PATCH request to https://eats.example.com/api/v1/recipe/recipes//
(extra trailing slash)
Simply changing the PATCH to a POST works.
When updating an existing recipe, the request looks like this:
PATCH https://eats.example.com/api/v1/recipe/recipes/yum-yums/
The frontend thinks you're editing an existing recipe on the create form. When it tries to submit this new recipe as an edit, it has nothing for the URL name, so that's why you get the double slashes.

I hope this helps!

Question about OpenEats Docker

Hi,

I try to use Openeats but when I start all my dockers, I have this message. I don't know if it is normal or not.

web_1 | Compiled successfully.
web_1 |
web_1 | File sizes after gzip:
web_1 |
web_1 | 264.98 KB (-5 B) build/static/js/main.cd245a94.js
web_1 | 5.79 KB build/static/css/main.8d187868.css
web_1 |
web_1 | The project was built assuming it is hosted at the server root.
web_1 | You can control this with the homepage field in your package.json.
web_1 | For example, add this to build it for GitHub Pages:
web_1 |
web_1 | "homepage" : "http://myname.github.io/myapp",
web_1 |
web_1 | The build folder is ready to be deployed.
web_1 | You may serve it with a static server:
web_1 |
web_1 | yarn global add serve
web_1 | serve -s build
web_1 |
web_1 | Find out more about deployment here:
web_1 |
web_1 | http://bit.ly/2vY88Kr
web_1 |
web_1 | Done in 25.58s.
openeats_web_1 exited with code 0

Thanks.
Jerome CARBEL

Add process to export recipe data

There should be a simple way to export/import recipe data from the site. This should be a way to either do this in bulk or on a per recipe basis.

404 at account settings

I created a super user and was able to log in, but when i try to access "My account" i get a 404 error. The requests to /admin/ and bundle.js are fine but for some reason the bundle.js seems to produce the 404 error.

Units glued to numbers get lost without warning

I noticed that if I add units glued to the numbers of an ingredients (for instance 1g of salt) the unit is dropped silently and the recipe is saved without the unit (in the example 1 of salt)
I would expect that this either saved the unit or raised a validation error.
This is specially common in recipes written in portuguese.

Running OpenEats without Docker

We should have a way to run OpenEats without docker. The following needs to be done in order for this to work.

  • Adding non-docker support to openeats-web.
  • Add documentation on how to setup openeats-web outside of docker.
  • Adding non-docker support to openeats-api.
  • Add documentation on how to setup openeats-api outside of docker.
  • Because custom settings are stored in env files we need to make them available from a settings files for both openeats-api and openeats-web
  • Add general documentation and an example of how an nginx configure would work
  • Add general documentation oh how all the services are linked together.
  • Help from others willing to test!

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.