GithubHelp home page GithubHelp logo

protonemedia / eddy-server-management Goto Github PK

View Code? Open in Web Editor NEW
473.0 15.0 119.0 6.54 MB

Open-Source Solution for Server Provisioning and Zero-Downtime PHP Deployment

Home Page: https://eddy.management

License: GNU Affero General Public License v3.0

PHP 68.00% JavaScript 12.57% CSS 0.01% Vue 0.22% Blade 15.47% Shell 3.72%
deploy deployment deployment-automation devops laravel laravel-splade splade zero-downtime

eddy-server-management's Introduction

Eddy Server Management ๐Ÿ›ก๏ธ

run-tests Splade Discord Server GitHub Sponsors MadeWithLaravel.com shield

Eddy is an open-source deployment tool built with Splade that allows users to deploy PHP applications with zero downtime using the Caddy web server.

Eddy supports easy server provisioning using Ubuntu 22.04 LTS and can start servers quickly from popular providers such as DigitalOcean, Hetzner, or any custom provider. Eddy also features automatic SSL certificate renewal, automatic security updates, and the ability to manage cron jobs, daemon processes, and firewall rules. It supports Database and File backups to S3, FTP, and SFTP destinations with custom schedules, automatic cleanup, and notifications. Additionally, users can manage MySQL databases and run multiple PHP versions on a single server.

Eddy Server Management is a Protone Media product.

Features โœจ

  • Deploy PHP apps with zero downtime and powered by Caddy web server.
  • Deploy from Github or any Git repository with ease.
  • Provision servers using Ubuntu 22.04 LTS.
  • Start servers quickly from DigitalOcean, Hetzner, or your preferred provider.
  • Keep your SSL certificates up-to-date with automatic renewal.
  • Keep your servers secure with automatic updates.
  • Run multiple PHP versions on a single server.
  • Easily manage your MySQL databases and users.
  • Manage cron jobs, daemon processes, and firewall rules.
  • Database and File backups to S3, FTP, and SFTP destinations.
  • Customize your deployment process with support for custom deployment scripts.
  • Edit configuration files directly from the web interface.
  • Quickly access both your server and application logs directly from the web interface.

Eddy is built with the Jetstream starter kit, so it also comes with:

  • Team management
  • Two-factor authentication
  • Email verification
  • A fully responsive design built with Tailwind CSS

Why is this open-source? ๐Ÿ”“

Eddy was created to show off the capabilities of Splade. As a real-life app, Eddy perfectly showcases some of Splade's key features, including the ability to build Single-Page Applications with Blade templates, Modal and Event capabilities, and Form and Table components.

Although Eddy is an open-source project, you have the option to use the hosted service at eddy.management. Choosing the hosted service not only provides you with the convenience of not having to host it yourself, but it also supports the continued development of Eddy and Splade. However, hosting it yourself is also an option.

Since Eddy is open-source, you can easily contribute to the project by submitting pull requests. This gives you the added benefit of being able to see exactly how the app works and interacts with your server. Don't hesitate to get involved and help make Eddy and Splade even better!

Requirements โš™๏ธ

Eddy is a regular Laravel 10 application, so it can be installed on any server that meets the Laravel server requirements. In addition to the Laravel requirements, Eddy requires the following:

  • Redis, as Eddy uses Laravel Horizon
  • timeout to run commands with a timeout
  • (optional) beautysh to format shell scripts
  • (optional) caddy to format a Caddyfile

Local development ๐Ÿ’ป

Eddy features built-in support for Vagrant, allowing for easy local server provisioning without the need to start up servers with a cloud provider. To make Eddy publicly accessible for server connections, you can use tools like Expose, Ngrok or Cloudflare Tunnel.

How is Eddy different from alternatives? ๐Ÿค”

Eddy sets itself apart from other solutions by being completely open-source, giving you the freedom to host it yourself and see exactly how it works. In fact, the hosted version of Eddy runs on the exact same code as the open-source version. While Eddy is still relatively new and may not be as feature-rich as some alternatives, our goal is to rapidly expand its capabilities over time.

Contributing ๐Ÿค

Thank you for considering contributing to Eddy! Our project follows the Laravel coding style and conventions as closely as possible. Here are some guidelines to help you get started:

Structure and Maintanability

  • Avoid adding new dependencies unless absolutely necessary.
  • Use the __() helper function instead of hardcoding translations.
  • Each Eloquent model should have a sensible Database Factory.
  • Use Events primarily to broadcast changes to the frontend, and avoid Listeners for simple tasks.
  • Use Queued Jobs to perform long-running tasks. Notify users that a task is running.
  • Use Notifications to send emails to users, or a Mailable when it's unimaginable that a notification would be sent to anything other than the mail channel.
  • Don't worry too much about striving for slim controllers. Controllers can have a few extra lines of code to improve code readability, but try to stick to CRUD actions unless necessary.
  • Don't bring HTTP request logic into areas other than the controller. For example, don't use the Auth or Request facade in a model or a service class.
  • Don't use inline Validation rules, but create a dedicated Rule class instead.
  • Validate requests in the controller when possible, and use Form Requests when validation rules are more complex.
  • Prefer enums over constants.

Security and Performance

  • Encrypt all sensitive data in Eloquent models.
  • Each Eloquent model should have a corresponding Policy to handle authorization.
  • Each Eloquent model should have a corresponding Resource to handle serialization.
  • Although we're not a fan of Eloquent's Mass Assignment protection, we do use them in Eddy as it's generally considered a best practice.
  • All non-GET routes should insert an ActivityLog entry.
  • Always use pagination on index pages.
  • The following Eloquent protections are enabled by default
    • Prevent Lazy Loading to avoid N+1 queries
    • Prevent silently discarding attributes
    • Prevents accessing missing attributes
    • Require a morph map when using polymorphic relations

Frontend

  • Write sensible error messages.
  • Use ULIDs instead of auto-incrementing IDs.
  • Avoid creating custom Vue components unless necessary, and use Splade's components as much as possible.

Security Vulnerabilities

If you discover a security vulnerability within Eddy, please send an e-mail to Eddy via [email protected]. All security vulnerabilities will be promptly addressed.

License

Eddy is open-sourced software licensed under the AGPL-3.0 License.

eddy-server-management's People

Contributors

dependabot[bot] avatar github-actions[bot] avatar pascalbaljet avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

eddy-server-management's Issues

provisioning Server error on step Install Node 18

Error on provisioning Server

 
================================================================================
โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“
================================================================================

                           SCRIPT DEPRECATION WARNING                    

  
  This script, located at https://deb.nodesource.com/setup_X, used to
  install Node.js is deprecated now and will eventually be made inactive.

  Please visit the NodeSource distributions Github and follow the
  instructions to migrate your repo.
  https://github.com/nodesource/distributions

  The NodeSource Node.js Linux distributions GitHub repository contains
  information about which versions of Node.js and which Linux distributions
  are supported and how to install it.
  https://github.com/nodesource/distributions


                          SCRIPT DEPRECATION WARNING

================================================================================
โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“โ–“
================================================================================

TO AVOID THIS WAIT MIGRATE THE SCRIPT
Continuing in 60 seconds (press Ctrl-C to abort) ...


## Installing the NodeSource Node.js 18.x repo...


## Populating apt-get cache...

+ apt-get update
Reading package lists... Done
E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)
E: Unable to lock directory /var/lib/apt/lists/
W: Problem unlinking the file /var/cache/apt/pkgcache.bin - RemoveCaches (13: Permission denied)
W: Problem unlinking the file /var/cache/apt/srcpkgcache.bin - RemoveCaches (13: Permission denied)
Error executing command, exiting

this step in this command

curl --silent --location https://deb.nodesource.com/setup_18.x | bash -

my fix is to replace this line with

apt-get install -y ca-certificates curl gnupg
mkdir -p /etc/apt/keyrings
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_18.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list

Feature-Request: Add support for installing Security-Key resident SSH key parts.

Attempting to add an sk-ecdsa SSH public key fails.

I have a Yubikey with a key-resident SSH key. The public part is present in my /home/user/.ssh/ directory but attempting to add the public key fails with this message:

image

(I've redacted some of the public key string in the above - but the error was shown prior to redaction.)

Could this be due to lack of support for key-resident ssh keys in the phpseclib library?

Creating server

I entered the digitalocean credentials and created a server. But in the configuration step, it creates the server in the DO, but does not recognize that it was created and does not exit this step.

image

Can you explain to me how this update works? horizon is already active

Remembering that it is a self-hosted version and the DO token has read and write p

Creating Site with zero_downtime_deployment fails

Output log:

Cloning into bare repository '/home/eddy/mishnatchem.yiddishe-kop.com/repository'...
Fetching origin
Cloning into '.'...
done.
Already on 'main'
Your branch is up to date with 'origin/main'.
getfacl: /home/eddy/mishnatchem.yiddishe-kop.com/releases/1690456722/storage/app/public: No such file or directory
setfacl: /home/eddy/mishnatchem.yiddishe-kop.com/releases/1690456722/storage/app/public: No such file or directory 

Super excited about this open-source tool!

is it possible to add existing servers to be managed on Eddy?

If I have existing droplets on DigitalOcean that are already provisioned and have sites and databases running on them, is it possible to add them to Eddy so I can add further sites?

Or how about if I wanted to migrate from Laravel Forge to Eddy?

Many thanks! This is a very interesting project!

FrankenPHP instead of pure Caddy

This project looks amazing. I have been quite fascinated however by frankenphp which is a Caddy binary with various precompiled tools, php, mercure, etc.

Is it possible to switch them out?

Mercure would supply SSE. I actually made a laravel forge recipe for mercure before someone pointed out. your project
https://forgerecipes.com/recipes/278

provisioning Server error on step Install MySQL

Error on provisioning Server

(Reading database ... 209529 files and directories currently installed.)
Preparing to unpack mysql-apt-config_0.8.24-1_all.deb ...
Unpacking mysql-apt-config (0.8.24-1) over (0.8.24-1) ...
Setting up mysql-apt-config (0.8.24-1) ...
Warning: apt-key should not be used in scripts (called from postinst maintainerscript of the package mysql-apt-config)
Warning: apt-key is deprecated. Manage keyring files in trusted.gpg.d instead (see apt-key(8)).
OK

this step in this command

sudo dpkg --install mysql-apt-config_0.8.24-1_all.deb

my fix is to replace it with new mysql-apt-config version 0.8.29

change these lines on resources/views/tasks/provision/software/install-mysql80.blade.php

wget -c https://dev.mysql.com/get/mysql-apt-config_0.8.29-1_all.deb
dpkg --install mysql-apt-config_0.8.29-1_all.deb

rm mysql-apt-config_0.8.29-1_all.deb

Why opcache.jit is off?

I deployed the same site on the equals servers on digitalocean. One is managed by laravel forge and the second one by eddy. In case with eddy the website was very slow. The only difference I found is that in /etc/php/8.2/mods-available/opcache.ini we can see opcache.jit=off
After I commented this line and restarted php the website is working as fast as on the forge management.
Is there some reason or explanation why do you disable that jit?

AWS server provider

First of all - a very big thank you for this amazing software!

Is adding AWS server provider on the roadmap?

If not, are you open to contributions? I would love to contribute to this project.

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.