Skip to content

Instantly share code, notes, and snippets.

@sebastian13
Created March 6, 2018 15:47
Show Gist options
  • Save sebastian13/ffc25b29dd268af4a49834b4761cecbb to your computer and use it in GitHub Desktop.
Save sebastian13/ffc25b29dd268af4a49834b4761cecbb to your computer and use it in GitHub Desktop.
docker-compose file for Wordpress + mysql database
version: '3'
services:
wordpress:
image: wordpress:php7.1-apache
container_name: example.com
restart: always
volumes:
- ./wp-content/:/var/www/html/wp-content
environment:
# Wordpress
- WORDPRESS_DB_PASSWORD=12345
networks:
- default
- proxy-tier
mysql:
image: mariadb
restart: always
volumes:
- ./datadir:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=12345
networks:
- default
# Use an existing network
networks:
proxy-tier:
external:
name: www-network
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment