Last active
January 29, 2019 02:06
-
-
Save mikeg0/57101772b45517b8af159531231f602d to your computer and use it in GitHub Desktop.
docker install.sh
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # install docker | |
| curl -fsSL https://get.docker.com/ | sh | |
| # run docker without sudo | |
| usermod -aG docker ubuntu | |
| # install docker-compose | |
| curl -L "https://github.com/docker/compose/releases/download/1.22.0/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose | |
| chmod +x /usr/local/bin/docker-compose | |
| curl -o docker-compose.yml https://gist.githubusercontent.com/mikeg0/73f0d9e1d86e2d0522a98de2425d1b5d/raw/751f516642474a2a917f453afda2e64b236af129/docker-compose.yml | |
| # copy docker-compose file to /srv/docker | |
| mkdir /srv/docker | |
| mv docker-compose.yml /srv/docker/ | |
| curl -o server.js https://gist.githubusercontent.com/mikeg0/46f04af581e03262a117464e96888f21/raw/8a712719330e2550aa078f5aa126a050ea586dcc/server.js | |
| mv server.js /srv/docker/ | |
| curl -o /etc/systemd/system/docker-compose-app.service https://gist.githubusercontent.com/mikeg0/96744a167830a63700d3961495dc8dd2/raw/355f5e88f3e7e8f04c6689ce2b571d7f92303ba6/docker-compose-app.service | |
| systemctl enable docker-compse-app | |
| docker-compose -f /srv/docker/docker-compose.yml up -d |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment