Wordpress projekt

This commit is contained in:
root
2025-09-17 12:50:28 +00:00
parent b764e859d2
commit b6399b9c08
4 changed files with 76 additions and 0 deletions

7
wordpress/Dockerfile Normal file
View File

@@ -0,0 +1,7 @@
# Dockerfile
FROM wordpress:5.1.1-fpm-alpine
RUN apk update \
&& apk add --no-cache ca-certificates curl \
&& update-ca-certificates \
&& ln -sf /etc/ssl/certs/ca-certificates.crt /etc/ssl/cert.pem

View File

@@ -0,0 +1,42 @@
version: '3'
services:
db:
image: mysql:8.0
container_name: db
restart: unless-stopped
env_file: .env
environment:
- MYSQL_DATABASE=wordpress
volumes:
- dbdata:/var/lib/mysql
command: '--default-authentication-plugin=mysql_native_password'
networks:
- app-network
wordpress:
depends_on:
- db
image: wordpress:latest
container_name: wordpress
restart: unless-stopped
env_file: .env
environment:
- WORDPRESS_DB_HOST=db:3306
- WORDPRESS_DB_USER=${MYSQL_USER}
- WORDPRESS_DB_PASSWORD=${MYSQL_PASSWORD}
- WORDPRESS_DB_NAME=wordpress
ports:
- "8080:80" # expose Apache to host
volumes:
- wordpress:/var/www/html
- ./uploads.ini:/usr/local/etc/php/conf.d/uploads.ini
networks:
- app-network
volumes:
dbdata:
wordpress:
networks:
app-network:

22
wordpress/nginx.conf Normal file
View File

@@ -0,0 +1,22 @@
server {
listen 8080;
server_name localhost;
root /var/www/html;
index index.php index.html index.htm;
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
include fastcgi_params;
fastcgi_pass wordpress:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
location ~ /\.ht {
deny all;
}
}

5
wordpress/uploads.ini Normal file
View File

@@ -0,0 +1,5 @@
upload_max_filesize = 400M
post_max_size = 400M
memory_limit = 512M
max_execution_time = 600
max_input_time = 600