Skip to content

Instantly share code, notes, and snippets.

@mishak87
Created November 25, 2014 18:05
Show Gist options
  • Save mishak87/58744a5170bd93a50ed9 to your computer and use it in GitHub Desktop.
Save mishak87/58744a5170bd93a50ed9 to your computer and use it in GitHub Desktop.
KISS definition of
# simple file for app deployment to single node
# host and namespace can be overriden by CLI parameters
# - it can be used to spread setup accross multiple servers that can't be in fleet.
host: # globally
namespace: customer01
enable:
- redis
services:

KISS format for describing docker containers for purpose of setting them as services on nodes with systemd and docker (primarily on CoreOS). I believe this approach can be modularized and CoreOS would be just one of many targets of various exporters/orchestrators.

Services could be expanded to more explicit syntax which would like something like this:

service:
	export:
		-
			exposed: 80
			exported: 8080
	link:
		-
			service: name
			alias: same
	volumes:
		-
			container: name
		-
			path: /path
app dvc: # built from local Dockerfile which has volume /app
cache dvc: # built using default DVC image ie.: sheldohn/dvc
- /app/cache
php-fpm: # custom build php-fpm utilizing /app
- app # --volumes-from app
- cache # --volumes-from cache (overrides /app/cache)
- redis
nginx: # custom built webserver utilizing /app/www
- 80:8080 # --export 80:8080
- app # --volumes-from app (for /app/www directory)
- php-fpm # --link php-fpm
- /var/nginx/cache # will create "anonymous" DVC for nginx cache
redis:2.6 optional: # simple add on service for in-memory caching
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment