Giter VIP home page Giter VIP logo

Recipe Yak CircleCI

Application to automate the selection of meals and creation of shopping lists.

Why?

To have a centralized location where multiple people can organize a meal plan.

Prior Art / Alternatives

name created open source?
Meal Master 1986
Recipe Box 1991-11-01
MasterCook 1992
Home Cookin 1992
Cookpad 1998-03-01
Cook'n 1999-05-27
LargoRecipes 2001-04
Krecipes 2003-05-01
Big Oven 2004-02-04
Mac Gourmet 2004-06-05
Gourmet 2004-06-14
REML 2005-03-02
Connoisseur 2008-08-06
Plan to Eat 2008-09-06
Yum Mac 2008
Chicken Ping 2009-06-22
Eat Your Books 2009-08-01
MealBoard 2009-09-24
Open Eats 2010-05-25
Pepperplate 2010-06-08
Paprika 2010-08-16
Foodie 2011
Copy Me That 2011-03-19
Anylist 2012-04-04
Whisk 2013
Mealime 2013-01-20
My Recipe Box 2013-04-20
SideChef 2014-10-11
Recipe Keeper 2015-06-24
Forks Meal Planner 2016-01-05
CookBook 2016-08-28
Cinc 2016-03-31
Grocy 2017-04-15
Grocery 2017-05-09
Cooklist 2017-05-26
Prepear 2017-11-09
Saffron 2017-12-04
Tandoor 2018-01-31
Recipe Sage 2018-02-18
KookBook 2018-04-24
Recursive Recipes 2018-05-07
NextCloud Cookbook 2019-03-10
RecipeRadar 2019-05-18
Crouton 2019-10-14
AnyMeal 2020-05-07
EnRecipes 2020-12-02
Mealie 2020-12-24
Coopes 2021-03-11
Mela 2021-03-15
Recipe Sage 2018-03-30
Reciped 2021-05-19
Famnom 2021-08-27
CooklangApp 2021-11-18
Homechart 2021-11-22
Meal DJ 2021-12-29
Recipe Box 2022-03-07
CookTime 2022-04-10
Simple Weekly Meal Planner 2022-05-04
Lollipop 2022-06-29
Umami 2022-07-12
Potluck 2022-11-01

Dev

Note: postgres is required. Either run it via docker-compose -f **docker-compose-dev.yml -d or via the homebrew cask mac app. Yarn and Poetry (0.12) are required for frontend and backend installation.

# create a .env with `DEBUG=1`. Note: you may need to update database URIs and related vars.
cp .env-example .env
echo "DEBUG=1" >> .env

cd frontend
yarn install
s/dev
s/test
s/lint
cd -

cd backend
brew install postgres # necessary for binary pyscopg2
poetry config virtualenvs.in-project true
poetry install
# start postgres (DBngin.app is nice on Mac)
s/dev
s/test
s/lint

# use `yarn` and `poetry` to add and upgrade dependencies
yarn add $FOO
poetry add $BAR

view postgres queries

  1. update the postgresql.conf to include have:
log_statement = 'all'
log_directory = 'pg_log'
log_filename = 'postgresql.log'
logging_collector = on
log_min_error_statement = error
log_rotation_size = 10MB
  1. tail the log file
tail -f "/Users/$USER/Library/Application Support/com.tinyapp.DBngin/Engines/postgresql/ED55F0A6-5CC7-49A4-B8D5-A5E819F1F1CB/pg_log/postgresql.log"

connect to prod postgres from local

  1. setup ssh proxy
ssh -N -L 1111:127.0.0.1:5432 recipeyak
  1. update .env
DATABASE_URL=postgres://postgres@localhost:1111/recipeyak

Prod

Deploy a new release

  1. Copy .env-example to .env and add in the proper configuration variables

  2. Install Ansible

  3. Setup Ansible Inventory

    ---
    all:
      hosts:
        recipeyak:
          ansible_host: 255.255.255.255
          ansible_user: root
  4. Run the playbook

    ansible-playbook ./infrastructure/playbooks/deploy.yml

Maintenance mode

Enabling maintenance mode returns a 503 status code with a webpage explaining the site is down for maintenance.

ansible-playbook ./infrastructure/playbooks/maintenance_mode.yml

Configuration

Environment variables are used for configuration. Unless otherwise stated, a value is required.

  • DJANGO_SECRET_KEY — long, randomized string required for django
    • ex: 284urfljkdflsdf
  • DATABASE_URL — URL for Django's database
    • ex: postgres://postgres@postgres:5432/postgres
  • EMAIL_HOST — SMTP hostname for sending email from Django
    • ex:smtp.mailgun.org
  • EMAIL_HOST_USER — SMTP email for logging into server
  • EMAIL_HOST_PASSWORD — SMTP password for authenticating
    • ex: SomeUnguessablePassword
  • SENTRY_DSN — Sentry secret configuration for backend.
    • ex: https://<key>:<secret>@sentry.io/<project>
  • FRONTEND_SENTRY_DSN — Sentry configuration for frontend.
    • ex: https://<key>@sentry.io/<project>
  • AWS_ACCESS_KEY_ID — AWS access key for backups and image upload.
    • ex: someAWSKey
  • AWS_SECRET_ACCESS_KEY — AWS secret key for backups and image upload.
    • ex: someSecretKey
  • STORAGE_BUCKET_NAME — Bucket for image upload.
    • ex: recipeyak-production
  • STORAGE_HOSTNAME — Hostname to use to access image bucket. An s3 hostname or cloudfront distribution hostname.
    • ex: 594f11c618d1.cloudfront.net

AWS configuration

  1. Create an S3 bucket and configure a CORS policy that allows the website to upload resources.

    [
      {
        "AllowedHeaders": ["*"],
        "AllowedMethods": ["PUT", "POST"],
        "AllowedOrigins": ["http://localhost:*", "https://recipeyak.com"],
        "ExposeHeaders": []
      }
    ]
  2. Create an IAM policy to give your AWS ID access to get_object and put_object for your bucket.

  3. Configure imgix to pull from the bucket.

recipeyak's Projects

recipeyak icon recipeyak

🍛 Application to automate the selection of meals and creation of shopping lists.

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.