Created
February 27, 2019 02:33
-
-
Save bozdoz/2e112f541302e92321f7612312f206d2 to your computer and use it in GitHub Desktop.
simple docker compose wordpress
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3.3' | |
services: | |
db: | |
image: mariadb | |
volumes: | |
- wp_db:/var/lib/mysql | |
restart: always | |
environment: | |
MYSQL_ROOT_PASSWORD: rootpass | |
wordpress: | |
image: wordpress | |
volumes: | |
# `wordpress` is a volume name; it does not make files accessible locally | |
- wordpress:/var/www/html | |
# map a local directory to the container | |
- ./wp-content:/var/www/html/wp-content | |
ports: | |
- 1234:80 | |
restart: always | |
environment: | |
WORDPRESS_DB_PASSWORD: rootpass | |
WORDPRESS_DB_HOST: db:3306 | |
volumes: | |
wp_db: | |
wordpress: |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment