Skip to content

Instantly share code, notes, and snippets.

@tivaliy
Last active March 10, 2025 08:09
Show Gist options
  • Save tivaliy/0cb5530e97521518321cf252564af4b4 to your computer and use it in GitHub Desktop.
Save tivaliy/0cb5530e97521518321cf252564af4b4 to your computer and use it in GitHub Desktop.
Wordpress in Docker container
services:
wordpress:
image: wordpress:latest
ports:
- "8080:80"
environment:
WORDPRESS_DB_HOST: db
WORDPRESS_DB_USER: wordpress
WORDPRESS_DB_PASSWORD: wordpress
WORDPRESS_DB_NAME: wordpress
depends_on:
- db
networks:
- wp_network
db:
image: mysql:latest
environment:
MYSQL_ROOT_PASSWORD: rootpassword
MYSQL_DATABASE: wordpress
MYSQL_USER: wordpress
MYSQL_PASSWORD: wordpress
volumes:
- db_data:/var/lib/mysql
networks:
- wp_network
volumes:
db_data:
networks:
wp_network:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment