LINUX, FOSS AND LIBRARY TECHNOLOGY ENTHUSIAST

Saturday, October 19, 2024

Setting Up Your Homepage with Docker

0 comments
In this post, we'll walk through how to quickly set up a personal homepage using Docker. The homepage service allows you to create a customizable and visually appealing personal website in no time.

Getting Started

Install Docker using this guide 

Create the Project Directory:

mkdir -p docker/homepage
cd homepage

Create the Docker Compose File: Open a new file named docker-compose.yml using your favorite text editor:

nano docker-compose.yml

Add the Following Configuration:

services:
  homepage:
    image: ghcr.io/benphelps/homepage:latest
    container_name: homepage
    ports:
      - 8001:3000
    volumes:
      - ./config:/app/config # Ensure your local config directory exists
      - ./homepage/png:/app/png # Map the png folder for icons
      - /var/run/docker.sock:/var/run/docker.sock:ro # Optional for Docker integrations
    restart: unless-stopped

Run the Service: Use the following command to start your homepage:

docker compose up -d && docker compose logs -f

Access Your Homepage

Once the service is running, you can access your homepage by navigating to http://localhost:8001 in your web browser.

No comments:

Post a Comment