Skip to content

Gixx/worstpractice.github.io

Repository files navigation

Worst Practice

This is the Jekyll and architecture source code of the Worst Practice website.

License

The writings under the _posts folder and the image assets are protected by copyright, the rest is free for learning and using.

Usage

To create and run the work environment

You need Docker for Desktop to be able to build the static website.

After you installed the Docker for Desktop, you need to simply run:

docker compose up -d

For the first run this will create a container and install all the necessary packages (jekyll, npm, webpack etc):

The Webpack's purpose is to create and compress the JavaScrip bundle for the website. The Jekyll's purpose is to build the static website form the provided sources.

Make sure the container is running with the following command:

docker ps -a

The output should show something like this:

CONTAINER IDIMAGECOMMANDCREATEDSTATUSPORTSNAMES
a0716aa43fdcworstpracticegithubio_alpine"tail -f /dev/null"2 minutes agoUp 2 minutes0.0.0.0:4000->4000/tcpworst-practice

To use the container

To access the container, you need to simply run:

$> docker exec -it -u dev worst-practice bash

Inside the container for the first time it's worth to make sure everything is up-to-date, so run:

bash-5.1# npm install
bash-5.1# sudo bundle install

If everything is set up, then build the content with (inside the container):

bash-5.1# npm run build

Or if you need to check the results in the browser, then use:

bash-5.1# npm run develop 

Then look up the website in the browser: http://127.0.0.1:4000

Have a break, go to sleep

If you want to stop with the work, but plan to continue it later, use:

docker-compose stop

IMPORTANT Choose the parameter wisely, you can have some unwanted accident, if you use the docker-compose down instead.

Go back to the start line

If something went wrong with the containers and you want a hard reset, run:

docker-compose down -v

About

Content for the Worstpractice website

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published