From 7c617d8076904cf730d7bd6786527d24479bdb23 Mon Sep 17 00:00:00 2001 From: Amir Pourmand Date: Fri, 19 Jan 2024 20:41:43 +0330 Subject: [PATCH] Update INSTALL.md (#2091) - #2090 --- INSTALL.md | 28 +++++++++++++++++++++------- docker-compose-slim.yml | 11 +++++++++++ 2 files changed, 32 insertions(+), 7 deletions(-) create mode 100644 docker-compose-slim.yml diff --git a/INSTALL.md b/INSTALL.md index 42a5d8a4820f..8e2c40879897 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -1,3 +1,20 @@ +# Table of Contents + +- [Installing and Deploying](#installing-and-deploying) + - [Recommended Approach](#recommended-approach) + - [Local Setup on Windows](#local-setup-on-windows) + - [Local Setup using Docker (Recommended)](#local-setup-using-docker-recommended) + - [Build your own docker image](#build-your-own-docker-image) + - [Local Setup (Legacy)](#local-setup-legacy) + - [Deployment](#deployment) + - [For personal and organization webpages](#for-personal-and-organization-webpages) + - [For project pages](#for-project-pages) + - [Enabling automatic deployment](#enabling-automatic-deployment) + - [Manual deployment to GitHub Pages](#manual-deployment-to-github-pages) + - [Deployment to another hosting server (non GitHub Pages)](#deployment-to-another-hosting-server-non-github-pages) + - [Deployment to a separate repository (advanced users only)](#deployment-to-a-separate-repository-advanced-users-only) + - [Upgrading from a previous version](#upgrading-from-a-previous-version) + # Installing and Deploying The recommended approach for using **al-folio** is to first create your own site using the template with as few changes as possible, and only when it is up and running customize it however you like. This way it is easier to pinpoint what causes a potential issue in case of a bug. The minimum steps required to create your own site are: @@ -18,7 +35,7 @@ Starting version [v0.3.5](https://github.com/alshedivat/al-folio/releases/tag/v0 ## Local setup on Windows -If you are using Windows, it is **highly recommended** to use [Windows Subsystem for Linux (WSL)](https://learn.microsoft.com/en-us/windows/wsl/install), which is a compatibility layer for running Linux on top of Windows. You can follow [these instructions](https://ubuntu.com/tutorials/install-ubuntu-on-wsl2-on-windows-11-with-gui-support) to install WSL and Ubuntu on your machine. You only need to go up to the step 4 of the tutorial (you don't have to enable the optional `systemd` nor the graphical applications), and then you can follow the instructions below to install docker. You can install docker natively on Windows as well, but it has been having some issues as can be seen in #1540, #2007. +If you are using Windows, it is **highly recommended** to use [Windows Subsystem for Linux (WSL)](https://learn.microsoft.com/en-us/windows/wsl/install), which is a compatibility layer for running Linux on top of Windows. You can follow [these instructions](https://ubuntu.com/tutorials/install-ubuntu-on-wsl2-on-windows-11-with-gui-support) to install WSL and Ubuntu on your machine. You only need to go up to the step 4 of the tutorial (you don't have to enable the optional `systemd` nor the graphical applications), and then you can follow the instructions below to install docker. You can install docker natively on Windows as well, but it has been having some issues as can be seen in [#1540](https://github.com/alshedivat/al-folio/issues/1540), [#2007](https://github.com/alshedivat/al-folio/issues/2007). ## Local setup using Docker (Recommended) @@ -34,11 +51,11 @@ $ docker compose pull $ docker compose up ``` -Note that when you run it for the first time, it will download a docker image of size 400MB or so. To see the template running, open your browser and go to `http://localhost:8888`. You should see a copy of the theme's demo website. +Note that when you run it for the first time, it will download a docker image of size 400MB or so. To see the template running, open your browser and go to `http://localhost:8080`. You should see a copy of the theme's demo website. -Now, feel free to customize the theme however you like (don't forget to change the name!). After you are done, you can use the same command (`docker compose up`) to render the webpage with all you changes. Also, make sure to commit your final changes. +Now, feel free to customize the theme however you like (don't forget to change the name!). Also, your changes should be automatically rendered in real-time (or maybe after a few seconds). -> To change port number, you can edit `docker-compose.yml` file. +> Beta: You can also use the slimmed docker image with a size below 100MBs and exact same functionality. Just use `docker compose up -f docker-compose-slim.yml` ### Build your own docker image @@ -54,9 +71,6 @@ $ docker compose up --build If you want to use a specific docker version, you can do so by changing `latest` tag to `your_version` in `docker-compose.yaml`. For example, you might have created your website on `v0.10.0` and you want to stick with that. -- Beta - You can also change the docker image tag to slim! It is a slimmed docker image with a size of below 100MBs (same functionality). - ## Local Setup (Legacy) For a hands-on walkthrough of running al-folio locally without using Docker, check out [this cool blog post](https://george-gca.github.io/blog/2022/running-local-al-folio/) by one of the community members! diff --git a/docker-compose-slim.yml b/docker-compose-slim.yml new file mode 100644 index 000000000000..43f6ebd0c663 --- /dev/null +++ b/docker-compose-slim.yml @@ -0,0 +1,11 @@ +version: "3" +# this file uses prebuilt image in dockerhub +services: + jekyll: + image: amirpourmand/al-folio:slim + build: . + ports: + - 8080:8080 + - 35729:35729 + volumes: + - .:/srv/jekyll