39 lines
899 B
YAML
39 lines
899 B
YAML
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 |