Comparer les révisions
1 Révisions
9e176e921d
...
working
Auteur | SHA1 | Date | |
---|---|---|---|
9f41e313aa |
32
.gitignore
externe
32
.gitignore
externe
@ -1,26 +1,28 @@
|
||||
# Application
|
||||
/src/web/app/plugins/*
|
||||
/src/!web/app/plugins/.gitkeep
|
||||
/src/web/app/mu-plugins/*
|
||||
/src/web/app/upgrade
|
||||
/src/web/app/uploads/*
|
||||
/src/!web/app/uploads/.gitkeep
|
||||
/bedrock/web/app/plugins/*
|
||||
/bedrock/!web/app/plugins/.gitkeep
|
||||
/bedrock/web/app/mu-plugins/*/
|
||||
/bedrock/web/app/upgrade
|
||||
/bedrock/web/app/uploads/*
|
||||
/bedrock/!web/app/uploads/.gitkeep
|
||||
|
||||
# WordPress
|
||||
/src/web/wp
|
||||
/src/web/.htaccess
|
||||
/bedrock/web/wp
|
||||
/bedrock/web/.htaccess
|
||||
|
||||
# Logs
|
||||
/src/*.log
|
||||
*.log
|
||||
|
||||
# Dotenv
|
||||
/src/.env
|
||||
/src/.env.*
|
||||
!/src/.env.example
|
||||
!/src/.env.sample
|
||||
.env
|
||||
.env.*
|
||||
!.env.example
|
||||
/bedrock/.env
|
||||
/bedrock/.env.*
|
||||
/bedrock/!.env.example
|
||||
|
||||
# Composer
|
||||
/src/vendor
|
||||
/bedrock/vendor
|
||||
|
||||
# WP-CLI
|
||||
/src/wp-cli.local.yml
|
||||
wp-cli.local.yml
|
||||
|
7
Dockerfile
Fichier normal
7
Dockerfile
Fichier normal
@ -0,0 +1,7 @@
|
||||
FROM php:8.0-apache
|
||||
|
||||
COPY entrypoint-wordpress.sh /usr/local/bin/
|
||||
|
||||
COPY apache-docker.conf /etc/apache2/sites-enabled/
|
||||
|
||||
ENTRYPOINT /usr/local/bin/entrypoint-wordpress.sh
|
10
README.md
10
README.md
@ -1,10 +0,0 @@
|
||||
# wordpress-bedrock-docker
|
||||
|
||||
A template for a Wordpress site using Bedrock (Composer) + Docker.
|
||||
|
||||
## Quick start
|
||||
|
||||
1. Create a new repository in Gitea, using this repository as a template
|
||||
2. Clone the new repository
|
||||
3. Copy `src/.env.example` to `src/.env`
|
||||
4. Run `docker-compose up`
|
17
apache-docker.conf
Fichier normal
17
apache-docker.conf
Fichier normal
@ -0,0 +1,17 @@
|
||||
<VirtualHost *:80>
|
||||
|
||||
ServerName localhost
|
||||
|
||||
ServerAdmin webmaster@localhost
|
||||
DocumentRoot /var/www/html/web
|
||||
|
||||
ErrorLog /var/log/apache2/error.log
|
||||
CustomLog /var/log/apache2/access.log combined
|
||||
|
||||
<Directory /var/www/html>
|
||||
Options Indexes FollowSymLinks
|
||||
AllowOverride All
|
||||
Require all granted
|
||||
</Directory>
|
||||
|
||||
</VirtualHost>
|
@ -1,17 +1,17 @@
|
||||
DB_NAME='wordpress'
|
||||
DB_USER='wordpress'
|
||||
DB_PASSWORD='wordpress'
|
||||
DB_NAME='database_name'
|
||||
DB_USER='database_user'
|
||||
DB_PASSWORD='database_password'
|
||||
|
||||
# Optionally, you can use a data source name (DSN)
|
||||
# When using a DSN, you can remove the DB_NAME, DB_USER, DB_PASSWORD, and DB_HOST variables
|
||||
# DATABASE_URL='mysql://database_user:database_password@database_host:database_port/database_name'
|
||||
|
||||
# Optional database variables
|
||||
DB_HOST='db'
|
||||
# DB_HOST='localhost'
|
||||
# DB_PREFIX='wp_'
|
||||
|
||||
WP_ENV='development'
|
||||
WP_HOME='http://localhost'
|
||||
WP_HOME='http://example.com'
|
||||
WP_SITEURL="${WP_HOME}/wp"
|
||||
|
||||
# Specify optional debug.log path
|
@ -39,7 +39,8 @@
|
||||
"roots/bedrock-disallow-indexing": "^2.0",
|
||||
"roots/wordpress": "5.8.2",
|
||||
"roots/wp-config": "1.0.0",
|
||||
"roots/wp-password-bcrypt": "1.1.0"
|
||||
"roots/wp-password-bcrypt": "1.1.0",
|
||||
"wp-cli/wp-cli-bundle": "^2.5"
|
||||
},
|
||||
"require-dev": {
|
||||
"squizlabs/php_codesniffer": "^3.6.0",
|
5489
bedrock/composer.lock
générée
Fichier normal
5489
bedrock/composer.lock
générée
Fichier normal
Fichier diff supprimé car celui-ci est trop grand
Voir la Diff
16
bedrock/web/app/mu-plugins/bedrock-autoloader.php
Fichier normal
16
bedrock/web/app/mu-plugins/bedrock-autoloader.php
Fichier normal
@ -0,0 +1,16 @@
|
||||
<?php
|
||||
/**
|
||||
* Plugin Name: Bedrock Autoloader
|
||||
* Plugin URI: https://github.com/roots/bedrock-autoloader
|
||||
* Description: An autoloader that enables standard plugins to be required just like must-use plugins. The autoloaded plugins are included during mu-plugin loading. An asterisk (*) next to the name of the plugin designates the plugins that have been autoloaded.
|
||||
* Version: 1.0.3
|
||||
* Author: Roots
|
||||
* Author URI: https://roots.io/
|
||||
* License: MIT License
|
||||
*/
|
||||
|
||||
namespace Roots\Bedrock;
|
||||
|
||||
if (is_blog_installed() && class_exists(Autoloader::class)) {
|
||||
new Autoloader();
|
||||
}
|
14
bedrock/web/app/mu-plugins/register-theme-directory.php
Fichier normal
14
bedrock/web/app/mu-plugins/register-theme-directory.php
Fichier normal
@ -0,0 +1,14 @@
|
||||
<?php
|
||||
/**
|
||||
* Plugin Name: Register Theme Directory
|
||||
* Plugin URI: https://github.com/roots/bedrock/
|
||||
* Description: Register default theme directory
|
||||
* Version: 1.0.0
|
||||
* Author: Roots
|
||||
* Author URI: https://roots.io/
|
||||
* License: MIT License
|
||||
*/
|
||||
|
||||
if (!defined('WP_DEFAULT_THEME')) {
|
||||
register_theme_directory(ABSPATH . 'wp-content/themes');
|
||||
}
|
@ -1,24 +1,27 @@
|
||||
---
|
||||
version: '3.1'
|
||||
version: "3"
|
||||
|
||||
services:
|
||||
web:
|
||||
image: nginx:alpine
|
||||
working_dir: /app
|
||||
wordpress:
|
||||
image: "thecoopcloud/wordpress:5.8.2-php7.4"
|
||||
build: .
|
||||
ports:
|
||||
- "80:80"
|
||||
volumes:
|
||||
- ./nginx.conf:/etc/nginx/conf.d/default.conf:cached
|
||||
- ./src:/app:cached
|
||||
|
||||
php:
|
||||
image: "thecoopcloud/wordpress:5.8.2-php7.4-fpm-bedrock"
|
||||
working_dir: /app
|
||||
volumes:
|
||||
- ./src:/app:cached
|
||||
- "./bedrock/:/var/www/html/"
|
||||
- "./entrypoint-wordpress.sh:/usr/local/bin/entrypoint-wordpress.sh"
|
||||
environment:
|
||||
- WORDPRESS_DB_HOST=db
|
||||
- WORDPRESS_DB_USER=wordpress
|
||||
- WORDPRESS_DB_PASSWORD=wordpress
|
||||
- WORDPRESS_DB_NAME=wordpress
|
||||
- WORDPRESS_CONFIG_EXTRA=${WORDPRESS_CONFIG_EXTRA}
|
||||
- WORDPRESS_DEBUG=${WORDPRESS_DEBUG}
|
||||
- PHP_EXTENSIONS
|
||||
container_name: "${PROJECT_NAME}_wordpress"
|
||||
|
||||
db:
|
||||
image: mariadb:10.4
|
||||
image: "mariadb:10.6"
|
||||
volumes:
|
||||
- "mariadb:/var/lib/mysql"
|
||||
environment:
|
||||
@ -26,6 +29,10 @@ services:
|
||||
- MYSQL_DATABASE=wordpress
|
||||
- MYSQL_USER=wordpress
|
||||
- MYSQL_PASSWORD=wordpress
|
||||
container_name: "${PROJECT_NAME}_db"
|
||||
|
||||
volumes:
|
||||
mariadb:
|
||||
|
||||
networks:
|
||||
backend:
|
||||
|
15
entrypoint-wordpress.sh
Fichier exécutable
15
entrypoint-wordpress.sh
Fichier exécutable
@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [ -n "$PHP_EXTENSIONS" ]; then
|
||||
docker-php-ext-install "$PHP_EXTENSIONS"
|
||||
fi
|
||||
|
||||
chown -R www-data:www-data /var/www/html
|
||||
|
||||
if [ -n "$*" ]; then
|
||||
"$@"
|
||||
fi
|
||||
|
||||
# Upstream ENTRYPOINT
|
||||
# https://github.com/docker-library/wordpress/blob/master/php7.4/apache/Dockerfile#L120
|
||||
apache2-foreground
|
1472
src/composer.lock
générée
1472
src/composer.lock
générée
Fichier diff supprimé car celui-ci est trop grand
Voir la Diff
Référencer dans un nouveau ticket
Bloquer un utilisateur