Skip to content

Maximization/autodeploy-docker

main
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Automed Docker deployments

This is a sample project used to demonstrate automating Docker deployments. The accompanying tutorial is at https://maximorlov.com/automate-your-docker-deployments/.

Interesting files to look at are .circleci/config.yml and deploy.sh.

Getting started

  1. Clone the repo git clone git@github.com:Maximization/autodeploy-docker.git && cd autodeploy-docker

  2. Start the server npm start

  3. Visit localhost:3000 in your browser

CircleCI Environment Variables

The following environment variables are used in the deployment pipeline:

DOCKER_USERNAME - Docker Hub username

DOCKER_PASSWORD - Docker Hub password

SSH_KEY - Base64 encoded private SSH key that has access to the deployment server

SERVER_PUBLIC_KEY - Base64 encoded public SSH key of the deployment server

SERVER_IP - Deployment server IP address

Docker commands

Build image

docker build --rm -t autodeploy-docker .

Run container

docker run --rm --init -d --name autodeploy-docker -p 3000:3000 autodeploy-docker

Clean up after Docker

docker system prune -af

About

Sample project used to demonstrate automatic Docker deployments

Topics

Resources

License

Stars

Watchers

Forks