mirror of
https://github.com/jhd3197/ServerKit.git
synced 2026-10-27 23:28:03 +09:00
104 lines
2.7 KiB
YAML
104 lines
2.7 KiB
YAML
id: wordpress
|
|
name: WordPress
|
|
version: "7.1.3"
|
|
description: World's most popular content management system for blogs and websites
|
|
icon: https://serverkit.ai/imgs/template-icons/wordpress.png
|
|
website: https://wordpress.org
|
|
documentation: https://wordpress.org/documentation/
|
|
categories:
|
|
- cms
|
|
- blog
|
|
- website
|
|
|
|
variables:
|
|
- name: VERSION
|
|
description: WordPress image tag (WP core + PHP variant, e.g. 7.1.3-php8.3-apache)
|
|
type: string
|
|
default: "7.1.3-php8.3-apache"
|
|
hidden: true
|
|
- name: HTTP_PORT
|
|
description: HTTP port
|
|
type: port
|
|
default: "8300"
|
|
hidden: true
|
|
- name: DB_PASSWORD
|
|
description: MySQL root password
|
|
type: password
|
|
generate: password
|
|
hidden: true
|
|
- name: WP_DB_PASSWORD
|
|
description: WordPress database password
|
|
type: password
|
|
generate: password
|
|
hidden: true
|
|
|
|
ports:
|
|
- port: 8080
|
|
protocol: tcp
|
|
description: Web interface
|
|
|
|
volumes:
|
|
- name: html
|
|
path: /var/www/html
|
|
description: WordPress files
|
|
- name: db
|
|
path: /var/lib/mysql
|
|
description: MySQL data
|
|
|
|
requirements:
|
|
memory: 1GB
|
|
storage: 5GB
|
|
|
|
compose:
|
|
services:
|
|
wordpress:
|
|
image: serverkit-wp-runtime:${APP_NAME}
|
|
build:
|
|
context: .
|
|
dockerfile: Dockerfile.serverkit-php
|
|
container_name: ${APP_NAME}
|
|
restart: unless-stopped
|
|
environment:
|
|
- WORDPRESS_DB_HOST=db
|
|
- WORDPRESS_DB_USER=wordpress
|
|
- WORDPRESS_DB_PASSWORD=${WP_DB_PASSWORD}
|
|
- WORDPRESS_DB_NAME=wordpress
|
|
volumes:
|
|
- wordpress_html:/var/www/html
|
|
ports:
|
|
- "${HTTP_PORT}:80"
|
|
depends_on:
|
|
- db
|
|
- redis
|
|
|
|
redis:
|
|
image: redis:7-alpine
|
|
container_name: ${APP_NAME}-redis
|
|
restart: unless-stopped
|
|
|
|
db:
|
|
image: mysql:8.0
|
|
container_name: ${APP_NAME}-db
|
|
restart: unless-stopped
|
|
environment:
|
|
- MYSQL_ROOT_PASSWORD=${DB_PASSWORD}
|
|
- MYSQL_DATABASE=wordpress
|
|
- MYSQL_USER=wordpress
|
|
- MYSQL_PASSWORD=${WP_DB_PASSWORD}
|
|
volumes:
|
|
- wordpress_db:/var/lib/mysql
|
|
|
|
volumes:
|
|
wordpress_html:
|
|
wordpress_db:
|
|
|
|
files:
|
|
- path: Dockerfile.serverkit-php
|
|
content: |
|
|
FROM wordpress:${VERSION}
|
|
RUN php -r '$v=PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION; $min=["8.2"=>"8.2.35","8.3"=>"8.3.36"]; exit(isset($min[$v]) && version_compare(PHP_VERSION,$min[$v],">=") ? 0 : 1);' \
|
|
&& docker-php-ext-install pdo_mysql
|
|
RUN printf 'session.upload_progress.enabled=0\n' > /usr/local/etc/php/conf.d/zz-serverkit-security.ini \
|
|
&& printf 'php_admin_flag session.upload_progress.enabled Off\n' > /etc/apache2/conf-available/serverkit-php-security.conf \
|
|
&& a2enconf serverkit-php-security
|