Deploy Homepage using Docker Compose

Deploy Homepage using Docker Compose

Spread the love

Deploy Homepage using Docker Compose

About Homepage

Homepage is a really slick self hosted Startpage Dashboard that I stumbled on when I was looking for a better solution than our useful links wiki page that I setup at work to allow users to quickly find all of the useful websites in one place. Better Still Homepage can be configured using docker compose and uses yaml files for configuration so it is super quick and easy to clone to github for backup if needed. I have barely scratched the surface of what Homepage can do but it has proven to be super useful so far and I have instances running at home and at work and I have both URLs as my default web pages when Google Chrome opens. I like using Homepage as it makes the link buttons easy to find and you can add custom icons which make it easier to group and find links to sites and also homepage automatically opens the page in a new tab so it is alway available to open more tabs so it saves a lot of clicking during the day!

Things to think about before starting

Before Deploying Homepage with Docker Compose you first need a machine or VM running Docker and Docker compose installed on it. HERE are instructions on how to install Docker and Docker Compose on Ubuntu 22.04 Server, THIS page also goes into creating an Ubuntu 22.04 server Proxmox Template and THIS page explains how to create a Proxmox VM from that template if you want to make the installation of your Docker/Docker Compose VM as quick as possible. This is the way that I created the VM to write this post so it is proven to work and takes maybe 15-20 to complete from start to finish so is way faster than manually creating a VM, installing Docker and Docker Compose and then configuring Homepage.

I also like to setup Docker Compose with persistent storage that keeps everything in the docker compose folder to make it easier to sync with GitHub or GitLab to keep the configs backed up and in version Control for easy restore if the VM gets corrupted. I will be writing a post about how to setup GitHub to keep your docker compose VM in sync and backed up on GitHub at a later date but the page on how to install Docker and Docker Compose on Ubuntu 22.04 Server briefly goes into setting up a file structure that can be used with Version Control easily.

Deploying Homepage With Docker Compose

Before starting to configure Hompage on go to the computername folder on your Docker/docker compose VM. For my VM I ran the following command:

cd /ith2-dkr-01

Make a Homepage folder where we will create the docker-compose.yml file that we will use to setup our hompage container. Run:

sudo mkdir homepage

Now go into the new folder by running:

cd homepage/

Create the docker-compose.yml by running:

sudo vim docker-compose.yml

Add the following config:

Deploy Homepage using Docker Compose

This file will create a docker container called ith2-homepage with persistent /config folder in the /vmname/homepage folder and using port 3000 on the local VM IP address.

Before we start the container we need to create a .env file in the homepage by running:

sudo touch .env

Start the new container by running the following command from the /vmname/homepage folder:

docker-compose up -d

The Container will now be created and started:

Deploy Homepage using Docker Compose

Check that the container is now running  by running:

sudo docker ps

This will show the container is running:

Deploy Homepage using Docker Compose

If you now do a ls-l in the homepage directory you will see that there is now a config folder which is where all the Homepage config files are:

Deploy Homepage using Docker Compose

Now open a browser and go to your VM ip on port 3000. For my VM I used the following url – http://192.168.0.180:3000/ and I have a default Homepage:

Deploy Homepage using Docker Compose

If you need to power the container down run the following command from the homepage folder:

docker-compose down

This will power down the container:

Deploy Homepage using Docker Compose

If you do a docker ps now there will be no containers running:

Deploy Homepage using Docker Compose

 

 

 

 

 

 

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top