Skip to content

Home

Paasify

Gitter PyPI PyPI - Downloads piwheels (including prereleases) GitHub commit activity License: GPL v3

PyPI - Python Version PyPI - Format PyPI - Status


Please :star: this project if like it of if you want to support it!

:warning: This project is currently in alpha stage, use at your own risks! :warning:

Official documentation is available on https://barbu-it.github.io/paasify/.


Deploy your docker-compose applications with ease and manage your infrastructure as code!

Paasify is a Python tool that will help you to deploy large collections of docker-compose.yml files. It's an thin overlay to the docker compose command and it will generate the docker-compose.yml you need. It provides some ways to fetch Apps collections, to deploy them and then ensure their state can be committed into version control.

Overview

🔥 Quickstart

There are different ways to install Paasify:

Installation with pip

Install Paasify with pip. You may eventually install paasify in its own Python VirtualEnv, please adapt your commands, but for most people:

pip install --user paasify

You can check paasify is correctly installed by running the command:

paasify --help

Requirements

The following system requirements are:

  • Linux x86 based OS (not tested yet on other platforms than Linux so far)
  • docker
  • docker compose or docker-compose
  • jq

For development only:

Example project: Wordpress

You need to have git and a running docker daemon. See requirements section for further details.

Let's try to deploy a simple Wordpress instance with Paasify. It consists in deploying a proxy, for managing incoming traffic (we uses Traefik here), a dashboard and the Worpress instance. To deploy a such project:

git clone https://github.com/barbu-it/paasify-example-wordpress.git wordpress


### Configuration

There is a simple config file that illustrate all componants, taken from the previous [wordpress example project](https://github.com/barbu-it/paasify-example-wordpress):
``` yaml title="paasify.yml"
sources:
  - name: community
    remote: https://github.com/barbu-it/paasify-collection-community

config:
  namespace: demo-wp
  extra_vars:
    - secrets.yml
  vars:
    # We expose to 127.0.0.1, under the *.locahost domain
    app_expose_ip: 127.0.0.1
    app_domain: localhost

    # Other domain examples
    #app_domain: mydomain.org
    #app_domain: localtest.me
    #app_domain: ${app_expose_ip}.nip.io

    # Default traefik network
    traefik_net_name: ${_prj_ns}_proxy_default
  tags_prefix:
    - homepage
    - traefik-svc

stacks:
  - app: proxy
    vars:
      traefik_net_external: False
    tags:
      - expose_http
      - expose_admin
  - app: home
  - app: community:wordpress

The first config element is sources, which is a list of git repo collections. The config contains all settings that will apply to the project and its stacks. The stacks key is a list of sequential stack to be applied. Each stack is configurable and allow a fine grained configuration override dependings the user needs. To each stack can be applied vars and/or a list of tags. Finally the config key allow to put project and default stack configuration.

Then, you just have to run the following to set all up and running:

paasify apply

You should be able to access to a fresh Wordpress instance on http://wordpress.localhost url while your project dashboard should be accessible on http://home.localhost.

What next?

Please start with one of:

  • Tutorial: More examples with some uses cases
  • Concepts: To understand Paasify core concepts
  • Usage: To see how to use Paasify
  • Plugins: Get collection reference
  • Reference: Get reference and config schemas