Skip to content

Instantly share code, notes, and snippets.

@lazypwny751
Created May 15, 2025 03:34
Show Gist options
  • Select an option

  • Save lazypwny751/f9b074dbc8829d2a115bdf840040b61b to your computer and use it in GitHub Desktop.

Select an option

Save lazypwny751/f9b074dbc8829d2a115bdf840040b61b to your computer and use it in GitHub Desktop.
Basic wordpress docker compose file.
version: '3.8'
services:
db:
image: mysql:5.7
container_name: wordpress-db
restart: always
environment:
MYSQL_DATABASE: wordpress
MYSQL_USER: wpuser
MYSQL_PASSWORD: wppass
MYSQL_ROOT_PASSWORD: rootpass
volumes:
- db_data:/var/lib/mysql
wordpress:
image: wordpress:latest
container_name: wordpress-app
depends_on:
- db
restart: always
ports:
- "80:80"
environment:
WORDPRESS_DB_HOST: db:3306
WORDPRESS_DB_NAME: wordpress
WORDPRESS_DB_USER: wpuser
WORDPRESS_DB_PASSWORD: wppass
volumes:
db_data:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment