Skip to content

Instantly share code, notes, and snippets.

@aechiara
Created September 28, 2015 12:27
Show Gist options
  • Save aechiara/5f001ccfa693fee39f76 to your computer and use it in GitHub Desktop.
Save aechiara/5f001ccfa693fee39f76 to your computer and use it in GitHub Desktop.
#!/bin/sh
XXX_DB_VOLUME='/opt/hospedagem/site_x/mysql_data'
XXX_SITE_VOLUME='/opt/hospedagem/site_x/site_data'
# Run Mysql
echo "Iniciando Mysql"
mydql_id=$(docker run --restart=on-failure:5 -d --name site_x_mysql -p 4001:3306 dockerfile/mysql)
sleep 2
echo "Status ${mysql_id}"
# Run Site
echo "Iniciando Joomla"
docker run -ti --restart=on-failure:5 --name site_x_site --link site_x_mysql:mysql -p 8001:80 -v ${site_x_SITE_VOLUME}:/var/www/site_x.com -e DATABASE_NAME=xxxxxx -e DATABASE_USER=xxxxxx -e DATABASE_PASSWORD=xxxxxx site_x_site:latest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment