Skip to content

Instantly share code, notes, and snippets.

@maishsk
Created January 13, 2019 09:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save maishsk/d8a15ddff5b630cc039392780032f6a5 to your computer and use it in GitHub Desktop.
Save maishsk/d8a15ddff5b630cc039392780032f6a5 to your computer and use it in GitHub Desktop.
Create solution
#!/bin/bash
# create structure
mkdir -p mysql/sql-scripts nginx node
## Download Files
# docker-compose
curl -L "https://gist.githubusercontent.com/maishsk/252c7d77502604ee9c4d3520b65f5cfb/raw/84ccae8b94dfb0e2bcbd4fd78b97aba31ce479bc/docker-compose.yml" -o docker-compose.yml
## mysql
curl -L "https://gist.githubusercontent.com/maishsk/1ad8db8fa785c10aecafefa967510667/raw/de4f4bcb9b390fe83ab1409ff174a8cc10f78f42/Dockerfile" -o mysql/Dockerfile
curl -L "https://gist.githubusercontent.com/maishsk/1ad8db8fa785c10aecafefa967510667/raw/de4f4bcb9b390fe83ab1409ff174a8cc10f78f42/create_data.sql" -o mysql/sql-scripts/create_data.sql
## nginx
curl -L "https://gist.githubusercontent.com/maishsk/cd603bc9a24d95ced7ab874395b72439/raw/af1d303d782ed2bf2f6f1ed1bbfaf30bca69877e/Dockerfile" -o nginx/Dockerfile
curl -L "https://gist.githubusercontent.com/maishsk/cd603bc9a24d95ced7ab874395b72439/raw/af1d303d782ed2bf2f6f1ed1bbfaf30bca69877e/nginx.conf" -o nginx/nginx.conf
## node
curl -L "https://gist.githubusercontent.com/maishsk/9d51f46a1dc48d67c75bd4d3fb26d085/raw/9aa5dc88bb180ed8d0205a7d2e92144d4f39b4a9/Dockerfile" -o node/Dockerfile
curl -L "https://gist.githubusercontent.com/maishsk/9d51f46a1dc48d67c75bd4d3fb26d085/raw/839e5a3c1d44ee72c8827f8da6c8564be019c7db/package.json" -o node/package.json
curl -L "https://gist.githubusercontent.com/maishsk/9d51f46a1dc48d67c75bd4d3fb26d085/raw/839e5a3c1d44ee72c8827f8da6c8564be019c7db/server.js" -o node/server.js
# create images
cd mysql; docker build -t maishsk/mysql .; cd ..
cd nginx; docker build -t maishsk/nginx .; cd ..
cd node; docker build -t maishsk/node-app .; cd ..
## bring it up
docker-compose up
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment