- A template to run a Jekyll site served on Nginx using Docker build.
- Ensure Docker is installed on your computer/server.
- Open a terminal and
cdto the root of this folder. - Execute
docker-compose -f docker-compose-create.yml run jekyllcreate jekyll new web. The command will initiate a new Jekyll site inside the folder named "web". - Build and run the new shiny Jekyll site. Execute
docker-compose -f docker-compose-dev.yml up --build; docker-compose -f docker-compose-dev.yml downOnce the build is complete, site is now accessible atlocalhostand served thru Nginx container. Any changes on your files are being watched.
- Ensure Docker is installed on your computer/server.
- Inside the root of this folder, copy the folder ( including all existing files ) of your old Jekyll blog and rename it to
web. ( Note: You can name the folder to your liking but you'll need to re-adjust the commands on yaml files ). - If you need some specific gems, you can take a look and modify the
Dockerfile. Also, you might want to adjust the paths on your existing_config.ymlfile. - Open a terminal and
cdto the root of this folder. - Execute
docker-compose -f docker-compose-dev.yml up --build; docker-compose -f docker-compose-dev.yml down. The command will build your old Jekyll site and serve thru nginx container. It should be now available atlocalhostand all changes on your files are being watched.
sshto your host server and follow one of the directions above ( depending on your needs ).- Git clone this repo on your host server.
- To test your installation, execute
docker-compose -f docker-compose-prod.yml up --build; docker-compose -f docker-compose-prod.yml down - Once everything is good and ready to go live -
docker-compose -f docker-compose-prod.yml up --build --detach