Add Wordpress

This commit is contained in:
Primož Pokeržnik
2024-04-06 16:43:53 +02:00
parent bcee56d96d
commit 82571b93d6
3 changed files with 78 additions and 0 deletions

View File

@@ -0,0 +1,39 @@
version: "3.8"
services:
db:
image: mysql:8.0
container_name: db
restart: unless-stopped
env_file: .env
environment:
- MYSQL_DATABASE=wordpress
volumes:
- ./db:/var/lib/mysql
command: '--default-authentication-plugin=mysql_native_password'
wordpress:
depends_on:
- db
image: wordpress:6.5.0-php8.3-fpm-alpine
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
volumes:
- ./data:/var/www/html
web:
depends_on:
- wp
image: nginx:stable-alpine
container_name: web
restart: unless-stopped
ports:
- "80:80"
volumes:
- ./data:/var/www/html:ro
- ./nginx.conf:/etc/nginx/conf.d/default.conf