Skip to content

Instantly share code, notes, and snippets.

@tlongren
Last active Nov 22, 2015
Embed
What would you like to do?
WordPress on Sloppy.io

Running WordPress on sloppy.io

The official wordpress and mysql image combined for a sloppy.io project. You can extend the json with more variables from the official images.

Start it

sloppy start wordpress.json  -var=USERNAME:username,URI:mydomain.sloppy.zone,DBUSER:db-user-for-wordpress,DBPASS:db-password-for-wordpress,DBROOT:db-root-password
where USERNAME has to be your  sloppy.io username
Example:

sloppy start wordpress.json  -var=USERNAME:john,URI:mywordpress.sloppy.zone,DBUSER:wpadmin,DBPASS:secret,DBROOT:moresecret
{
"project": "wordpress",
"services": [
{
"id": "frontend",
"apps": [
{
"id": "apache",
"domain": {
"uri": "$URI",
"type": "HTTP"
},
"instances": 1,
"mem": 512,
"image": "wordpress",
"port_mappings": [
{
"container_port": 80
}
],
"env": {
"WORDPRESS_DB_HOST": "mysql.backend.wordpress.$USERNAME",
"WORDPRESS_DB_USER": "$DBUSER",
"WORDPRESS_DB_PASSWORD": "$DBPASS"
},
"dependencies": [
"../../backend/mysql"
]
}
]
},
{
"id": "backend",
"apps": [
{
"id": "mysql",
"instances": 1,
"mem": 512,
"image": "mysql",
"env": {
"MYSQL_ROOT_PASSWORD": "$DBROOT",
"MYSQL_USER": "$DBUSER",
"MYSQL_PASSWORD": "$DBPASS",
"MYSQL_DATABASE": "wordpress"
}
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment