Month: July 2021

Install Docker on LINUX – Ubuntu

Last Updated on December 6, 2021 by sandeeppote

OS requirements

To install Docker Engine, you need the 64-bit version of one of these Ubuntu versions:

  • Ubuntu Hirsute 21.04
  • Ubuntu Groovy 20.10
  • Ubuntu Focal 20.04 (LTS)
  • Ubuntu Bionic 18.04 (LTS)

To check the OS version of Linux, use-

cat /etc/*release*

Check if you have already install docker on machine-

docker --version

Uninstall the older version of Docker if you have any, to do so-

sudo apt-get remove docker docker-engine docker.io containerd runc

Install Repository

Before the docker is installed setup the docker repository-

User Application Package Tool (APT) to install supporting packages for Docker. Use following commands-

sudo apt-get update
sudo apt-get install \
    apt-transport-https \
    ca-certificates \
    curl \
    gnupg \
    lsb-release

Add Docker’s official GPG key:

GPG or GNU Privacy Guard is a public key cryptographic implementation and is used for allowing secure transmission of information between source and destination

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg

Install Docker Engine

sudo apt-get update

sudo apt-get install docker-ce docker-ce-cli containerd.io

This installs the latest version of docker on OS.

Check the latest version of docker

docker --version

Reference documents- https://docs.docker.com/engine/install/ubuntu/

Sitecore 10 SXA- Improve site performance by enabling Asset Optimizer

Last Updated on July 8, 2021 by sandeeppote

Asset optimizer helps improve the performance in production site by compressing/minifying the CSS and JS.

Minification of assets helps to cut the unnecessary portions of code and reduce the size of file to boost the performance by reducing amount of data over the internet.

Sitecore administrators can enable/disable optimizer globally of to a specific site.

Enable/Disable the Asset Optimizer globally

Enabling or disabling optimizer globally affects all the sites configured in the Sitecore instance.

To change the optimiser settings navigate to following location. This is accessible to Administrators-

/sitecore/system/Settings/Foundation/Experience Accelerator/Theming/Optimiser

You can also search “optimiser”-

If you can’t find this you may have to re-index master.

Select Scripts or Styles to change the settings

Modes of Optimizations

Concatenate And Minify Mode

When this option is selected. Sitecore will concatenate and minify the OOTB and Custom Scripts and Styles.

Example:- If you have a custom theme you can add the css files in your extension theme

This is in master database

Highlighted CSS is a extension to the base theme.

Web database when the page is first requested Sitecore will concat and minify all css in extension theme folder and create a optimised-min.css file

Styles loaded from the extension theme is concatenated and minified version with timestamp in query parameter (optimised-min.css)

Notice that the file name is optimised-min.css

Size of the optimized version is 367 KB
Concatenate and minified. Loads without comments

Concatenate Mode

Change the mode of optimization to “Concatenate”.

Web database now has optimized file created in extension theme

Styles loaded from the extension theme is concatenated version with timestamp in query parameter (optimised.css)

Notice that the reference to file is changed to optimised.css

Size of the optimized version is 381 KB
Concatenate but not minified. CSS loads with comments

Disabled Mode

Change the mode to “Disabled” and should see all the files loaded separately. Disabled mode is good for debugging but should not be used for production as it will give a performance hit.

CSS files are loaded separately and not concatenated nor minified

Best Practice – Enable Asset Optimizer in production environments

The same can be applied to the Scripts.

You have set the optimizer to concatenate and minify globally to your Sitecore instance but still don’t see the site been optimized.