Initial WordPress theme
This commit is contained in:
55
docker-compose.yml
Normal file
55
docker-compose.yml
Normal file
@@ -0,0 +1,55 @@
|
||||
services:
|
||||
db:
|
||||
image: mysql:8.0
|
||||
container_name: gongxue-zero-db
|
||||
restart: unless-stopped
|
||||
environment:
|
||||
MYSQL_ROOT_PASSWORD: root_password
|
||||
MYSQL_DATABASE: wordpress
|
||||
MYSQL_USER: wordpress
|
||||
MYSQL_PASSWORD: wordpress
|
||||
volumes:
|
||||
- db_data:/var/lib/mysql
|
||||
ports:
|
||||
- "3307:3306"
|
||||
|
||||
wordpress:
|
||||
image: wordpress:latest
|
||||
container_name: gongxue-zero-wp
|
||||
restart: unless-stopped
|
||||
depends_on:
|
||||
- db
|
||||
ports:
|
||||
- "8080:80"
|
||||
environment:
|
||||
WORDPRESS_DB_HOST: db:3306
|
||||
WORDPRESS_DB_USER: wordpress
|
||||
WORDPRESS_DB_PASSWORD: wordpress
|
||||
WORDPRESS_DB_NAME: wordpress
|
||||
command:
|
||||
- bash
|
||||
- -c
|
||||
- |
|
||||
sed -i 's|AllowOverride None|AllowOverride All|g' /etc/apache2/apache2.conf
|
||||
cat > /var/www/html/.htaccess <<'HTACCESS'
|
||||
# BEGIN WordPress
|
||||
<IfModule mod_rewrite.c>
|
||||
RewriteEngine On
|
||||
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
|
||||
RewriteBase /
|
||||
RewriteRule ^index\.php$ - [L]
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteRule . /index.php [L]
|
||||
</IfModule>
|
||||
# END WordPress
|
||||
HTACCESS
|
||||
chown www-data:www-data /var/www/html/.htaccess
|
||||
docker-entrypoint.sh apache2-foreground
|
||||
volumes:
|
||||
- wp_data:/var/www/html
|
||||
- ./:/var/www/html/wp-content/themes/gongxue-from-zero
|
||||
|
||||
volumes:
|
||||
db_data:
|
||||
wp_data:
|
||||
Reference in New Issue
Block a user