Skip to main content

Deploy and set up Docker Compose based web apps with Ansible

Project description

Docksible

About

Install a Dockerized web app on a given remote VPS, with a single command in your local CLI - powered by Ansible.

Supports SSL, so it's perfect for quick demo servers, or even lightweight production environments.

You can also install on localhost or local VMs, perfect for local experiments with different types of apps.

Features

  • WordPress
  • Joomla
  • Redmine (open source issue tracker)
  • "Custom app" - you simply provide a valid container name (from Docker Hub), and any required app specific environment variables (via --extra-env-vars), and it should work.
  • SSL certs, including test certs
  • SSH proxy to tunnel hidden services like database
  • phpMyAdmin container
  • Hopefully more soon ;-)

Requirements

  • Local: Unix with Python 3.9 or newer. Tested this on Gentoo and Ubuntu Linux. Might work on macOS, but I don't know. Won't work on Windows, because it uses Ansible under the hood, which AFAIK is not supported for Windows.
  • Remote: VPS running Ubuntu, or maybe other Debian based flavor, reachable via SSH. It should probably work on all Debian distros, but I have only tested on Ubuntu.

Installing

Intall with Pip: python -m pip install docksible

Usage

These examples should be self explanatory:

  • docksible user@example.com wordpress --letsencrypt --email admin@example.com
  • docksible user@example.com redmine --letsencrypt --email admin@example.com

Run the --help flag for all supported options.

Using the SSH proxy

You can include a simple SSH proxy into your app's Docker network, by passing the --ssh-proxy flag. This will drop in a small container that you can use to port forward some hidden services, like the database. Here's how to do it:

  • Include --ssh-proxy in the Docksible command (ex: docksible user@host wordpress --ssh-proxy)
  • Set up the proxy service's authorized_keys file. This will be improved in the future, but until then:
    • SSH into your server as root
    • Copy root's .ssh/authorized_keys into docksible-volumes/ssh-proxy-data/
    • Shell into the proxy container, and basically chown -R proxy_user:proxy_user /home/proxy_user. This could also be improved, but for now, just needs to be done once.
  • Now the proxy service is ready to use. For example:
    • Set up the tunnel to proxy the database:
    ssh -p 2222 proxy_user@yourserver.com -L 9000:docksible_db:3306
    
    • Connect to the database:
    mysql -u your_db_user -p --port=9000 --host=localhost --protocol=TCP
    

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

docksible-1.0.0.tar.gz (17.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

docksible-1.0.0-py3-none-any.whl (21.6 kB view details)

Uploaded Python 3

File details

Details for the file docksible-1.0.0.tar.gz.

File metadata

  • Download URL: docksible-1.0.0.tar.gz
  • Upload date:
  • Size: 17.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for docksible-1.0.0.tar.gz
Algorithm Hash digest
SHA256 c12459dea67871469b140dcaccb387cf5b9f2276113423aa4b417620d6331634
MD5 90e99a86c4dabf6915a95d96b889303c
BLAKE2b-256 bc4ac62307a4e655fd5e110b2a591f5e8af9a22dee9f3c76577029c5984c0f98

See more details on using hashes here.

File details

Details for the file docksible-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: docksible-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 21.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for docksible-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d744b1e1e607948a22ae2b8268d4c8d7d12a12bd1c3b32bf43c874f8efa1bc4e
MD5 c0c188ad11834f272a5ff855058e06c3
BLAKE2b-256 eaefee4eeba67bed60c64fba47f8d2438fc4c1570c9fbd390e50ed3d1b298934

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page