Giter Club home page Giter Club logo

voting-app's Introduction

Github actions Build

Laravel template

Modern php application with automatically deploy via ssh by GitHub Actions

Steps for using

  1. Fork this project and clone it
  2. cp -r laravel-template YOUR_NAME && cd YOUR_NAME/ && rm -rf .git
  3. Use make up for run docker containers
  4. Run make bash for open docker container with application
  5. Run composer update
  6. Create new repo on GitHub, run git init, add remote, push it to GitHub
  7. Generate new SSH key for access to server
  8. If this is the README of your fork, click this link to go to the "Secrets" page.
  9. Create new secret hash for waiting finish of current deploy process, create .env and update DEV_HASH (using by app/Http/Middleware/Development.php)
  10. Add new secrets:
    • DEPLOY_URL: url of your website
    • DEV_HASH: secret dev hash for access to deploy route
    • DEPLOY_HOST: server's IP for SSH connection
    • DEPLOY_PATH: path to website on server, /var/www/html/something
    • DEPLOY_PORT: server's port for SSH connection
    • DEPLOY_USER: server's username for SSH connection
    • DEPLOY_KEY_PASS: server's SSH public key passphrase
  11. Push new code to main branch and check GitHub Actions status

How it's work

Main idea is to create basic deploy (via rsync) to remote server over SSH with waiting finish of current deploy process. GitHub Action is very simple, you can check .github/workflows/dev.yml. Step 'Check previous deploy' call specific url /deploy, which has response status. If we have deploy process, script waiting finish of process. For deploy we use burnett01/[email protected], which use rsync for pushing files to remote server, where supervisor has cron tak This cron task run every 60 sec and apply migrations, remove deploy pid file, etc.

License

The Laravel framework is open-sourced software licensed under the MIT license.

voting-app's People

Contributors

setnemo avatar

Watchers

 avatar

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.