README
appway (DRAFT / WORK IN PROGRESS)
The proserver is inspired by heroku a deployment mechanism and is designed for rubynas but may also work for others.
The main design goal is to have a simple deployment mechanism for multiple procfile based applications. Because the procfile allows applications based on ruby, nodejs, python.
Special with this server is, that it has a build in reverse-proxy and therefore has no need for something like nginx or apache. The procfile server runs as root
and listens on port 80
.
Because the appway will host multiple applications on the same host it supports different types of virtual application/webserver proxying:
- Host based: Like
example.appserver.local
- X-App based: Like
X-App: example
. This is an alternative to make requests using AJAX to multiple applications on the same host without changing the host really. - Request Path based: Like
appserver.local/example
- Port based based: Like
appserver.local:8001
. Actually this is not a proxy request, it is connecting to the application directly.
Deployment
The deployment of the procfile server usually happens as a debian package or something similar. Which than uses git repositories to deploy services.
Configuration
The main requirement for the deployed application is a Procfile
. The Procfile
works as the main application manifest, but not all information can be gatherd by it, the rest will be passed when the application is installed. The second requirement is a git repository where the application code can be fetched.
Example Procfile:
web: puma -p $PORT
The rest of the application is configured by the application environment.
Procfile
The Procfile
ist standard an works as described in foreman. Special is the treatment of environemnt variabes, which get overwritten in some parts:
- The default process environment is used
- The .env file is applyed
- The application server based config options are set (db config etc.)
- Process specific variables like port numbers are applyed
API
The profile-server has a restful api to install new applications and so stuff with them.
Add new application
POST /applications
Content:
{
"name": "example",
"repo": {
"url": "git://github.com/threez/appway-example.git",
"branch": "master"
},
"packages": {
"apt-get": [
"build-essential",
"nodejs",
"npm"
]
},
"user": "www-data",
"group": "www-data",
"domain": [
"^example.*",
"^example.local