Skip to content

Instantly share code, notes, and snippets.

@codelitt
Created October 15, 2014 01:48
Show Gist options
  • Save codelitt/c47bece467e2be7352fe to your computer and use it in GitHub Desktop.
Save codelitt/c47bece467e2be7352fe to your computer and use it in GitHub Desktop.
Docker workflow
# Create ghost volume to store our data
docker run -v ghost-storage:/ghost-override --name=ghost-storage ubuntu true
# Create site volume
dockur run -v incoin.io:/var/www/incoin.io --name=site-storage ubuntu true
#Create nginx volume to store sites-enabled, logs and certs
docker run -v nginx/logs:/var/log/nginx -v certs:/etc/nginx/certs -v sites-enabled:/etc/nginx/sites-enabled --name=nginx-storage ubuntu true
# Start the ghost daemon using volume from ghost-storage
docker run -d --volumes-from ghost-storage --name=ghost dockerfile/ghost
# Create nginx container
docker run -d -p 80:80 --link ghost:ghost --volumes-from=nginx-storage --volumes-from=site-storage --name=nginx dockerfile/nginx
# Start the servers
docker start ghost nginx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment