Skip to content

Instantly share code, notes, and snippets.

@Soben
Created January 15, 2020 19:10
Show Gist options
  • Save Soben/a09315c546429259bbb01be8c91fc302 to your computer and use it in GitHub Desktop.
Save Soben/a09315c546429259bbb01be8c91fc302 to your computer and use it in GitHub Desktop.
Wordpress Docker Configuration
version: '3.1'
services:
wordpress:
image: wordpress
restart: always
ports:
- 8080:80
environment:
WORDPRESS_DB_HOST: db
WORDPRESS_DB_USER: sqluser
WORDPRESS_DB_PASSWORD: sqlpassword
WORDPRESS_DB_NAME: wordpress
volumes:
- "./www:/var/www/html"
db:
image: mysql:5.7
restart: always
command: [--default-authentication-plugin=mysql_native_password]
environment:
MYSQL_DATABASE: wordpress
MYSQL_USER: sqluser
MYSQL_PASSWORD: sqlpassword
volumes:
- "./db:/var/lib/mysql"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment