ryanwinchester / servidor

A modern web application for managing servers

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Servidor

GitHub release Build Status codecov Depfu

A modern web application for managing servers. Built on Laravel, using Semantic-UI-Vue for the frontend.

Servidor is still very much a work in progress, but what has been added so far is mostly functional.

Table of Contents

What it Does

Currently there is basic support for projects and management of Linux users and groups. When you add a site, Servidor will take care of cloning the repository, creating the relevant NginX configs and even reloading the web server. Starting in v0.5 you also have the ability to manually trigger a git pull on any given project without ever having to touch SSH.

Installation

WARNING! Servidor is not yet ready for production use!

Interactive Setup

To install Servidor, first ensure you're logged in as root to a fresh server, then run the following in SSH:

# Save the installer first. Piping to Bash may lead to unexpected results in interactive mode
curl -sSL https://raw.githubusercontent.com/dshoreman/servidor/installer/setup.sh > /tmp/setup \
  && bash /tmp/setup.sh

When Servidor has finished installing, you'll see the default login credentials with links to the Servidor backend below them. In case you don't have DNS pointing at the server yet, both IP and hostname-based links are listed.

Running locally? Follow the Development instructions below to set up your local test environment.

Startup Script

If your server provider supports startup scripts for fully automated installation, you can pipe the installer directly to bash:

#/bin/sh
curl -s https://raw.githubusercontent.com/dshoreman/servidor/installer/setup.sh | bash

Options can be passed to the installer by appending them after -s -- like so:

#/bin/sh
curl -s https://raw.githubusercontent.com/dshoreman/servidor/installer/setup.sh | bash -s -- -v --branch develop

Development

Servidor is setup to use Vagrant for development. To get started, first clone the repository and run vagrant up.

Installation happens automatically as part of the provisioning process, but the installer will not build frontend assets if it detects Vagrant. Instead, you'll need to install and build them separately after running vagrant up:

# Clean-install NPM packages from the lock file
npm ci

# Compile the frontend assets for development
npm run dev

Alternatively, you can use npm run watch or npm run hot to have assets automatically rebuilt during development.

By default, Servidor can be accessed at http://servidor.local:8042. If you have vagrant-hostsupdater or similar, this will be mapped automatically. Alternatively you can use http://192.168.10.100:8042, or run the following to update /etc/hosts:

echo '192.168.10.100 servidor.local' | sudo tee -a /etc/hosts

Running Tests

With many tests relying on certain system utilities, it's best to run them in Vagrant as the web server user to avoid any issues.
To run the PHPUnit tests, use make test which will automatically SSH into the Vagrant VM and run phpunit as www-data.

Other make commands are available such as make syntax to run other CI tools. For a complete list, check the Makefile.

Docker

Build app container

docker-compose build app

Run as daemon

docker copmposer up -d

Check status and list running containers:

docker-compose ps

Exec commands

docker-compose exec app ls -l

Contributing

As noted above, Servidor is still very young. Your ideas, code and overall feedback are all highly valued, so please feel free to open an issue or pull request - the latter should go to the develop branch. Thanks! ❤️

About

A modern web application for managing servers

License:GNU Lesser General Public License v2.1


Languages

Language:PHP 61.1%Language:Vue 19.0%Language:Shell 16.2%Language:Blade 3.1%Language:Makefile 0.4%Language:Dockerfile 0.2%