├── Dockerfile ├── LICENSE ├── README.md └── config └── wp-config.php /Dockerfile: -------------------------------------------------------------------------------- 1 | #FROM wordpress:fpm 2 | FROM wordpress:fpm-alpine 3 | 4 | # Pm ondemand to save RAM 5 | RUN sed -i 's/pm = dynamic/pm = ondemand/g' /usr/local/etc/php-fpm.d/www.conf 6 | 7 | #RUN apt-get update && apt-get -y install curl unzip 8 | RUN apk add --update curl unzip && rm -Rf /var/cache/apk/* 9 | 10 | # Sqlite integration plugin 11 | RUN curl -o /tmp/wpplugin.zip https://downloads.wordpress.org/plugin/sqlite-integration.1.8.1.zip 12 | RUN unzip /tmp/wpplugin.zip -d /usr/src/wordpress/wp-content/plugins/ 13 | RUN rm /tmp/wpplugin.zip 14 | # Setup 15 | RUN cp /usr/src/wordpress/wp-content/plugins/sqlite-integration/db.php /usr/src/wordpress/wp-content 16 | 17 | COPY config/wp-config.php /var/www/wp-config.php 18 | RUN chown www-data:www-data /var/www/wp-config.php 19 | 20 | VOLUME ["/var/www/db"] 21 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2017 Milan Boers 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | 23 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # wordpress-sqlite 2 | Lightweight Wordpress on Alpine with php-fpm ondemand and SQLite instead of MySQL. 3 | 4 | ```bash 5 | docker pull milanb/wordpress-sqlite 6 | ``` 7 | [Docker Hub milanb/wordpress-sqlite](https://hub.docker.com/r/milanb/wordpress-sqlite/) 8 | 9 | Can be used in conjunction with [wordpress-nginx](https://github.com/milanboers/wordpress-nginx) ([Docker Hub milanb/wordpress-nginx](https://hub.docker.com/r/milanb/wordpress-nginx/)) to provide a full lightweight Wordpress solution. 10 | 11 | Example docker-compose.yml for both: 12 | ```yaml 13 | version: '2' 14 | services: 15 | wp: 16 | image: milanb/wordpress-sqlite 17 | environment: 18 | - WP_HOME=https://mysite.com 19 | - WP_SITEURL=https://mysite.com 20 | volumes: 21 | - db:/var/www/db 22 | - uploads:/var/www/html/wp-content/uploads 23 | restart: always 24 | http: 25 | image: milanb/wordpress-nginx 26 | links: 27 | - wp:wordpress 28 | volumes_from: 29 | - wp 30 | ports: 31 | - "8081:80" 32 | volumes: 33 | db: 34 | external: true 35 | uploads: 36 | external: true 37 | ``` 38 | -------------------------------------------------------------------------------- /config/wp-config.php: -------------------------------------------------------------------------------- 1 |