Skip to content

Instantly share code, notes, and snippets.

View amjadafanah's full-sized avatar

Amjad Afanah amjadafanah

View GitHub Profile
@amjadafanah
amjadafanah / Node.js Hello World
Created January 18, 2016 23:20
Node.js application template. Deploy and manage this application on vSphere, OpenStack, Amazon EC2, Rackspace, Microsoft Azure, Google Compute Engine, DigitalOcean, IBM SoftLayer and many other clouds. Once the application is deployed, get access to monitoring, alerts and notifications, application backups, in-browser terminal to access the cont…
node:
image: dchq/nodejs:latest
mem_min: 50m
cpu_shares: 1
publish_all: true
@amjadafanah
amjadafanah / Docker Wordpress with MySQL
Last active January 19, 2016 03:17
Docker Wordpress and MySQL application template. Deploy and manage this application on vSphere, OpenStack, Amazon EC2, Rackspace, Microsoft Azure, Google Compute Engine, DigitalOcean, IBM SoftLayer and many other clouds. Once the application is deployed, get access to monitoring, alerts and notifications, application backups, in-browser terminal…
Wordpress:
image: wordpress:latest
mem_min: 1g
publish_all: true
environment:
- WORDPRESS_DB_PASSWORD={{MySQL|MYSQL_ROOT_PASSWORD}}
- WORDPRESS_DB_HOST={{MySQL|container_private_ip}}:3306
- WORDPRESS_DB_USER={{MySQL|MYSQL_USER}}
- WORDPRESS_DB_NAME={{MySQL|MYSQL_DATABASE}}
MySQL:
@amjadafanah
amjadafanah / gist:ab99ec7b8025ee4b1546
Last active January 19, 2016 03:29
Docker Names Directory Java application. This 2-Tier Docker Java Application is deployed on Docker Tomcat Application Server and MySQL. Once the application is deployed, get access to monitoring, alerts and notifications, continuous delivery using Jenkins, application backups, scale in/out, in-browser terminal to access the containers, log viewi…
AppServer:
image: tomcat:8.0.21-jre8
mem_min: 600m
publish_all: true
host: host1
cluster_size: 1
environment:
- database_driverClassName=com.mysql.jdbc.Driver
- database_url=jdbc:mysql://{{MySQL|container_ip}}:3306/{{MySQL|MYSQL_DATABASE}}
- database_username={{MySQL|MYSQL_USER}}
@amjadafanah
amjadafanah / Docker Java App (Nginx-Tomcat-MariaDB)
Last active July 30, 2016 12:18
Docker Java Names Directory application. This 3-Tier Docker Java Application is deployed on Docker Nginx, Tomcat Application Server and MariaDB. Once the application is deployed, get access to monitoring, alerts and notifications, continuous delivery using Jenkins, application backups, scale in/out, in-browser terminal to access the containers, …
LB:
image: nginx:latest
publish_all: true
mem_min: 50m
host: host1
plugins:
- !plugin
id: 0H1Nk
restart: true
lifecycle: on_create, post_scale_out:AppServer, post_scale_in:AppServer, post_start:AppServer, post_stop:AppServer
@amjadafanah
amjadafanah / Docker LAOP Stack
Created January 19, 2016 04:05
Docker PHP Names Directory application. This LAOP Stack, 3-Tier Docker PHP Application is deployed on Docker Apache HTTP Server, Docker PHP-Apache and Docker Oracle XE. Once the application is deployed, get access to monitoring, alerts and notifications, continuous delivery using Jenkins, application backups, scale in/out, in-browser terminal to…
HTTP-LB:
image: httpd:latest
publish_all: true
host: host1
mem_min: 50m
plugins:
- !plugin
id: uazUi
restart: true
lifecycle: on_create, post_scale_out:PHP, post_scale_in:PHP
# Medium - Instance name prefix.
Medium:
region: us-west-1
instanceType: ecs.s2.large
# Ubuntu 14.04 64bit
image: ubuntu1404_64_40G_aliaegis_20160222.vhd
# mandatory - port 22 should be accessible
securityGroup: sg-u11e46tlb
# SSH ROOT username
username: root
Nginx:
image: nginx:latest
publish_all: true
mem_min: 50m
host: host1
plugins:
- !plugin
id: 0H1Nk
restart: true
lifecycle: on_create, post_scale_out:AppServer, post_scale_in:AppServer
HTTP-LB:
image: httpd:latest
publish_all: true
mem_min: 50m
host: host1
plugins:
- !plugin
id: uazUi
restart: true
lifecycle: on_create, post_scale_out:AppServer, post_scale_in:AppServer
## Execute these commands on the host running the postgres_slave container
## Enter the postgres_slave container
docker exec -it [postgres_slave_container_name] bash
## Access the names database using psql
psql names
## List the tables
\dt;
aspnet:
image: dchq/aspnet-helloweb:latest
mem_min: 50m
host: host1
publish_all: true
cluster_size: 1