Skip to content

Instantly share code, notes, and snippets.

@Remzi1993
Last active September 17, 2022 03:15
Show Gist options
  • Save Remzi1993/b07ca9ee4ad6ab4d2340e2088ffc2a24 to your computer and use it in GitHub Desktop.
Save Remzi1993/b07ca9ee4ad6ab4d2340e2088ffc2a24 to your computer and use it in GitHub Desktop.
services:
db:
container_name: WordPress-DB
image: mariadb:latest
command: '--default-authentication-plugin=mysql_native_password'
volumes:
- db:/var/lib/mysql
restart: always
environment:
- MYSQL_ROOT_PASSWORD=somewordpress
- MYSQL_DATABASE=wordpress
- MYSQL_USER=wordpress
- MYSQL_PASSWORD=wordpress
expose:
- 3306
- 33060
wordpress:
container_name: 'WordPress'
depends_on:
- db
image: wordpress:latest
ports:
- 80:80
restart: always
environment:
- WORDPRESS_DB_HOST=db
- WORDPRESS_DB_USER=wordpress
- WORDPRESS_DB_PASSWORD=wordpress
- WORDPRESS_DB_NAME=wordpress
volumes:
- "./www/html:/var/www/html"
- "./plugins:/var/www/html/wp-content/plugins"
- "./themes:/var/www/html/wp-content/themes"
volumes:
db:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment