备份数据库和webroot
Dockerfile和docker-compose
没有官方镜像,所以跟typecho一样需要自己写Dockerfile:
FROM php:7.4-fpm
RUN apt-get update || : && apt-get install libpng-dev zlib1g-dev libzip-dev libonig-dev imagemagick libmagick-dev -y
RUN docker-php-ext-install mysqli pdo pdo_mysql bcmath zip mbstring gd exif
RUN set -e
RUN cd ~
RUN chown -R www-data:www-data /var/www/html
CMD ["php-fpm"]
依赖可能稍稍多装了一些,不过懒得测试了。
docker-compose.yml:
version: "3"
services:
piwigo:
build: .
volumes:
- ./webroot:/var/www/html
- ./zz-custom.conf:/usr/local/etc/php-fpm.d/zz-custom.conf
- ./php.ini:/usr/local/etc/php/conf.d/php.ini
ports:
- "127.0.0.1:3030:9000"
container_name: piwigo
restart: always
networks:
- default
stdin_open: true
tty: true
depends_on:
- db
db:
image: mariadb
container_name: piwigo_db
networks:
- default
volumes:
- ./mariadb:/var/lib/mysql
- ./piwigo-dump.sql:/dump.sql
restart: always
environment:
MARIADB_ROOT_PASSWORD: xxxxxxxxxxxx
MARIADB_DATABASE: piwigo
MARIADB_USER: piwigo
MARIADB_PASSWORD: xxxxxxxxxxxx
两个php的配置文件用来调整上传大小限制等设定。
恢复备份
参照typecho和wordpress即可。
数据库相关设定在/webroot/local/config/database.inc.php
Nginx反代
按wordpress的配置即可。
Comments NOTHING