docker-php-startpage
Runs a PHP-based startpage in Docker
- Source code: GitHub
- Docker container: Docker Hub
- Image base: PHP
- Init system: N/A
- Application: N/A
Explanation
- Runs a PHP-based startpage in Docker.
- See Features for more detailed usage information.
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, but it's assumed the user will mount a Docker volume at
/var/www/html/user_includes
to include custom configuration files.
Docker image information
Docker image tags
latest
: Latest versionX.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: startpage
restart: unless-stopped
networks:
- startpage
ports:
- '80: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).
git clone https://github.com/loganmarchione/docker-php-startpage.git
cd docker-php-startpage
composer update
php -S localhost:8000
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
toconfig.php
, since PHP allows setting default variables and comments - Investigate using
curl
instead ofget_headers
(curl
might be faster?) - Add a try/except to the
get_headers
call