Skip to content

loganmarchione/docker-php-startpage

Repository files navigation

docker-php-startpage

CI/CD Docker Image Size (latest semver)

Runs a PHP-based startpage in Docker

  • Source code: GitHub
  • Docker container: Docker Hub
  • Image base: PHP
  • Init system: N/A
  • Application: N/A
  • Architecture: linux/amd64,linux/arm64,linux/arm/v7

Explanation

  • Runs a PHP-based startpage in Docker.
  • See Features for more detailed usage information.

Screenshots

Desktop

Screenshot Screenshot

Mobile

Screenshot Screenshot

Requirements

  • Everything is PHP (server-side), so the Docker container running this image will need to be able to reach URLs to do a status check.
  • The startpage works out of the box (using a sample config.json file), but it's assumed the user will mount a Docker volume at /var/www/html/user_includes to include custom configuration files.
  • See Features for more detailed usage information.

Docker image information

Docker image tags

  • latest: Latest version
  • X.X.X: Semantic version (use if you want to stick on a specific version)

Environment variables

N/A

Ports

Port on host Port in container Comments
Choose at your discretion 80 Apache

Volumes

Volume on host Volume in container Comments
Choose at your discretion /var/www/html/user_includes Used to store user config files

Example usage

Below is an example docker-compose.yml file.

version: '3'
services:
  startpage:
    container_name: docker-php-startpage
    restart: unless-stopped
    networks:
      - startpage
    ports:
      - '8888:80'
    volumes:
      - 'user_includes:/var/www/html/user_includes'
    image: loganmarchione/docker-php-startpage:latest

networks:
  startpage:

volumes:
  user_includes:
    driver: local

Below is an example of running locally (used to edit/test/debug).

# Build the Dockerfile
docker compose -f docker-compose-dev.yml up -d

# View logs
docker compose -f docker-compose-dev.yml logs -f

# Destroy when done
docker compose -f docker-compose-dev.yml down

TODO

  • Learn PHP
  • Add a healthcheck
  • Make the image smaller (currently ~500MB due to vendor directory, maybe load resources from a CDN?)
  • Add check to make sure JSON is valid (currently, if it's not valid, nothing will load)
  • Get navbar_title_image config option working
  • Change config.json to config.php, since PHP allows setting default variables and comments
  • Investigate using curl instead of get_headers (curl might be faster?)
  • Add a try/except to the get_headers call
  • Run on ARM or ARM64 devices