Skip to content

Simple bash script to handle Docker deployments by swapping containers

License

Notifications You must be signed in to change notification settings

rasshofer/swaploy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 

Repository files navigation

Swaploy

Simple bash script to handle Docker deployments by swapping containers

Usage

bash swaploy.sh myapp

Swaploy passes all arguments following the project name (myapp in the example above and below) directly to the docker run command. This way, you can configure your containers.

bash swaploy.sh myapp -p 8080:8080 -v /persistence/www:/var/www

Example

Assuming you want to deploy your application each time you push changes in Git, you could combine Swaploy with a post-receive hook on your Git remote or simply by using stuff like Webhooks (e.g. via Captain Hook; see JSON example below) if you’re using GitHub.

[
  "cd /apps/example-app",
  "git pull origin master",
  "bash swaploy.sh myapp -p 8080:8080 -v /persistence/www:/var/www"
]

Changelog

  • 0.0.1
    • Initial version

License

Copyright (c) 2016 Thomas Rasshofer
Licensed under the MIT license.

See LICENSE for more info.

About

Simple bash script to handle Docker deployments by swapping containers

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages