Skip to content

Instantly share code, notes, and snippets.

@fnzv
Created October 5, 2018 14:05
Show Gist options
  • Save fnzv/a0f704cd83983f925b340dfa55c17366 to your computer and use it in GitHub Desktop.
Save fnzv/a0f704cd83983f925b340dfa55c17366 to your computer and use it in GitHub Desktop.
Wordpress Docker compose
version: "2"
services:
db:
image: mariadb
# uncomment the following two lines for data persistence
#volumes:
# - ./db_data:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=simplepw
# uncomment the following lines, to be able to access the database on your machine
#ports:
# - "3306:3306"
wp:
image: wordpress
volumes:
- ./wordpress:/var/www/html
ports:
- "80:80"
environment:
- WORDPRESS_DB_HOST=db
- WORDPRESS_DB_PASSWORD=simplepw
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment