GithubHelp home page GithubHelp logo

hackerrahul / magicdep-adonis Goto Github PK

View Code? Open in Web Editor NEW
8.0 3.0 1.0 56 KB

A Shell script to deploy AdonisJS 5 Projects on server or local environment by just answering some fun question's

License: MIT License

Shell 100.00%

magicdep-adonis's Introduction

license-image author-image

MagicDep Adonis

A Shell script to deploy AdonisJS 5 Projects on server or local environment by just answering some fun question's

Lets see what it can do!

So MagicDep is a shell script that can deploy any AdonisJS 5 application easily

So Lets start from the beginning, when computer was invented... (wait, that's a little too early).

When we deploy a NodeJS application, we need an ubuntu server (as far as i know, and i know shit!!, no seriously I AM A NOOB), moving on!!

So we need a ubuntu server where we have to install NodeJS and npm or yarn, then we need a git installed if we are using version control from github or bitbucket to clone our repositories.

After all of this things, we need to build our project, run migration, setup environment so it should not be exposed to client, install a process manager, setup a script for that, install dependencies and a lot of other things, and god knows how many times we "cd foldername" while deploying.

So to cut all that crap, I have developed a shell script that will do everything for you (From Install NodeJS, NPM, PM2, migrations installing dependencies, everything.)

Installation

You just need a git pre installed on your server.

sudo apt-get install git

to run a shell script we need a script (ofcourse).

before that switch to sudo environment by running this command,

sudo su

So lets install script, just run any one of this command.

wget

wget -q https://raw.githubusercontent.com/hackerrahul/MagicDep-Adonis/main/Magic.sh -O magic.sh; sudo sh ./magic.sh

or

curl

curl -o magic.sh -sL https://raw.githubusercontent.com/hackerrahul/MagicDep-Adonis/main/Magic.sh; sudo sh magic.sh

Now it will ask for some questions just answer them accordingly.

So now if your github repository is private, you need a github access token, which is mentioned while running it but why not here too. So to get github access token, you have to navigate to this page

  • Give it a note
  • Set Expiration to whatever you like.
  • Check the repo options in Scopes
  • Generate Token Now.

So now its a NodeJs application, and NodeJS is just imcomplete without Environment variables isn't it? So to install the ENV Variables to make sure our project run, we need to store them in our project but outside the build directory.

So at the moment, instead of entering env variables just in the command line(that will not work), We have to install it.

So Here is a Quick workflow for that.

  • Copy all the content in your .env file
  • go to http://gist.github.com
  • Name the file as anything and paste all the content in that GIST
  • Now create a Secret GIST (Make Sure - SECRET GIST), because i don't think you can afford your secret variables roaming around internet.

  • Now open it as raw and copy the URL

image

  • Copy the Direct Path of the raw file

image

That's it, Pass this url in wherever you've been asked in the installation.

You're good to go, try it, star it.

Adios!

magicdep-adonis's People

Contributors

hackerrahul avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

khongten001

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.