Code Monkey home page Code Monkey logo

ffg's Introduction

Erpnext Maintenance repo

Step 1: Clone the repo -

Step 2: Set the working dir environment variable

export WORKING_DIR=<path_to_clone_directory>

It has 3 child directories

  1. backup-restore - takes care of the erpnext site backup restore process
  2. deployment - takes care of the deployment prcoess and installation of a new erpnext site
  3. rev-proxy-server - reverse proxy server (nginx) to point a request dynamically to a site. This contains a nginx config file and Dockerfile to create the image.

Easy Installation Steps

  1. Clone the repo
  2. Go inside the deployment dir:
cd ffg/deployment/lifi-erpnext
  1. run the following to spin up the erpnext instance
 docker compose --project-name lifi-erpnext-runner --env-file prod.env up -d
  1. Select the date time of the back up from Google Drive (use LIFI Admin Account) that you want to restore, for ex - "20220726_092703-lifi_erpnext". Also note the db password from the "***_site_config.json" file from Google Drive copy that you want to restore. Following which run the restore script -
 sh lifi.eprnext.restore.gdrive.sh -s lifi.erpnext -p lifi-erpnext-runner -l lifi.erpnext.backup -f 20220726_092703-lifi_erpnext -r <mysql_root_password_selected_during_initial_app_setup>-d <password_of_app_schema_that_you_want_to_restore_found_in_the_backed_up_site_config_json>

A help of the shell script is available -

azureuser@LIFI1:~/LIFI/devops/ffg/backup-restore/script$ sh lifi.eprnext.restore.gdrive.sh -h
Site restore command usage:
-s <site_name>
-p <project_name>
-l <restore_dir_location_in google_drive>
-f <file_name_prefix to download from google drive dir>
-r <root password of Mysql DB>
-d <optinal parameter: pass the application schema password. If not provided a random password will be generated.>

Note for the the first time i..e when deploying in a VM for the first time, the google drive auth fileis not there. Hence you need to manually copy the file in the container space -

docker cp <path_to_gdrive_service_account_creds_json> gdrive-sync-job-sync-site-1:app/

That's it!!

ffg's People

Contributors

rakacha avatar

Watchers

 avatar

Forkers

mohsinalimat

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.