Skip to content

Instantly share code, notes, and snippets.

@azuddin
Last active July 10, 2023 02:19
Show Gist options
  • Save azuddin/d55d0496424dfe25f72fa529143b98ff to your computer and use it in GitHub Desktop.
Save azuddin/d55d0496424dfe25f72fa529143b98ff to your computer and use it in GitHub Desktop.
services:
db_store:
# We use a mariadb image which supports both amd64 & arm64 architecture
image: mariadb:10.6.4-focal
# If you really want to use MySQL, uncomment the following line
#image: mysql:8.0.27
command: '--default-authentication-plugin=mysql_native_password'
volumes:
- db_data:/var/lib/mysql
restart: always
environment:
- MYSQL_ROOT_PASSWORD=somewordpress
- MYSQL_DATABASE=wordpress
- MYSQL_USER=wordpress
- MYSQL_PASSWORD=wordpress
expose:
- 3306
- 33060
wordpress_store:
image: wordpress:latest
volumes:
- wp_data:/var/www/html
restart: always
environment:
- WORDPRESS_DB_HOST=db_store
- WORDPRESS_DB_NAME=wordpress
- WORDPRESS_DB_USER=wordpress
- WORDPRESS_DB_PASSWORD=wordpress
ports:
- "3000:80"
volumes:
db_data:
wp_data:
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment