Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tonyp7/docker-wordpress-fpm-sqlite-nginx
:package: Run a containerized Wordpress site running on Nginx, PHP-FPM and SQLite
https://github.com/tonyp7/docker-wordpress-fpm-sqlite-nginx
docker docker-compose nginx php php-fpm sqlite wordpress
Last synced: 13 days ago
JSON representation
:package: Run a containerized Wordpress site running on Nginx, PHP-FPM and SQLite
- Host: GitHub
- URL: https://github.com/tonyp7/docker-wordpress-fpm-sqlite-nginx
- Owner: tonyp7
- License: mit
- Created: 2023-12-19T06:49:29.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-01-02T07:21:01.000Z (11 months ago)
- Last Synced: 2024-10-11T13:36:45.604Z (about 1 month ago)
- Topics: docker, docker-compose, nginx, php, php-fpm, sqlite, wordpress
- Language: Dockerfile
- Homepage:
- Size: 24.4 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![CI Workflow](https://github.com/tonyp7/docker-wordpress-fpm-sqlite-nginx/actions/workflows/compose.yml/badge.svg)
# Wordpress Site with SQLite, Nginx and PHP-FPM on Docker
This repository features a `docker-compose.yml` that allows running very easily a Wordpress website running on php-fpm, Nginx and SQLite.
It makes it easy to run a containerized self-hosted blog.
# How to use
Just simply clone and run!
```bash
git clone https://github.com/tonyp7/docker-wordpress-fpm-sqlite-nginx.git
cd docker-wordpress-fpm-sqlite-nginx
docker compose up --detach
```By default, the site will run on the 8080 port so you can go to http://localhost:8080 on the local host.
# Docker Images
The repository contains two docker images: `wordpress` and `nginx`.
## Wordpress image
The Wordpress image is based on `wordpress:fpm-alpine` which itself is based off the `php:fpm-alpine` (at the time of writing, `php:8.2-fpm-alpine`, although this may change to include newer revisions); which is itself based off `alpine`.
The image will pull the latest version of the official SQlite plugin for Wordpress and install it.
The docker compose will in addition setup the `wp-config.php` file so that it can run properly with SQLite.### Additional PHP configuration
The PHP default configuration include sensible values, but some are not well-suited to running a Wordpress site. For this reason, the Docker image contains additional PHP configuration in `uploads.ini` and `hardening.ini`.
The first file increase the file upload max size to 10M (default: 2M) while hardening includes additional security settings.## Nginx image
The Nginx image is based off the `nginx:stable-alpine` official image.
It contains a sensible configuration file that hardens and make nginx wordpress friendly. Notably the configuration files:
- Increases file upload max size to 10M
- Caches static files
- Imposes a rate limit on wp-login.php
- Disable external access to xmlrpc.php
- Disable running php files inside Wordpress content folders
The configuration provides a solid foundation to any Wordpress website.# Docker volumes
Two volumes will be created on the first launch: `db` and `html`.
The first volume contains the SQLite database files, while the html subfolder contains the Wordpress installation.
This should make it easy to backup using your favourite method.