Skip to content

Harin-Archives/umami

 
 

Repository files navigation


Logo

Umami

Table of Contents

  1. About The Project
  2. Getting Started
  3. Deployment
  4. Contributing

About The Project

Umami has many recipes

Built With

  • React Native - Frontend
  • FastAPI - Backend
  • MySQL - Database
  • Nginx - Proxy
  • Firebase - Auth/Storage Bucket
  • Docker Compose - Build/Deployment
  • Python - Scraping
  • GCP Compute Engine - Hosting

Getting Started

To get a local copy up and running follow these simple steps.

Prerequisites

  • yarn
  • docker
  • docker-compose

Installation

Docker Backend

  1. cd into root folder
  2. run docker-compose -f docker-compose.dev.yml up --build -d

Backend will be exposed on port 8080 MySQL will be exposed on port 3306

React Native Frontend

  1. cd into umami/frontend
  2. run yarn
  3. start server with npx react-native start
  4. open a new cli window in the same folder
iOS:
  1. cd into ios and run pod install
  2. run npx react-native run-ios
Android:
  1. run npx react-native run-android

Deployment

  1. Clone repo to VM
  2. run docker-compose up --build -d
  3. run chmod +x init-letsencrypt.sh
  4. run sudo ./init-letsencrypt.sh

Further deployment changes

Inide of Production machine from root umami folder

  1. On a local device, run bash ./export.sh to save a csv copy of data
  2. docker-compose down
  3. sudo rm -rf ./database/data
  4. sudo ./init-letsencrypt.sh
  5. run docker-compose up --build -d
  6. run python3 recipe_data_update.py
  7. On a local device, run bash ./import.sh to re-upload saved data

Database Backup & Restore

Backup

  1. Run mysqldump -u root -p -h umami.harinwu.com -P 3306 -R umami_db > umami.sql

Restore

  1. Drop database with drop database umami_db
  2. Create database with create database umami_db
  3. Run mysql -u root -p -h umami.harinwu.com -P 3306 umami_db < umami.sql

Contributing

Contributions are what make the community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 69.3%
  • Python 25.4%
  • Java 1.9%
  • Shell 1.4%
  • Objective-C 1.3%
  • Dockerfile 0.3%
  • Other 0.4%