SHARE
TWEET

WordPress - Docker compose

androsfenollosa Feb 18th, 2019 (edited) 87 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. version: '3.3'
  2.  
  3. # docker-compose.yaml
  4. # Author: Andros Fenollosa https://programadorwebvalencia.com/
  5.  
  6. services:
  7.    db:
  8.      image: mysql:5.7
  9.      volumes:
  10.       - ./db_data:/var/lib/mysql
  11.      restart: always
  12.      environment:
  13.        MYSQL_ROOT_PASSWORD: somewordpress
  14.        MYSQL_DATABASE: wordpress
  15.        MYSQL_USER: wordpress
  16.        MYSQL_PASSWORD: wordpress
  17.  
  18.    wordpress:
  19.      depends_on:
  20.       - db
  21.      image: wordpress:latest
  22.      volumes:
  23.       - ./www:/var/www/html/:rw
  24.      ports:
  25.       - "8000:80"
  26.      restart: always
  27.      environment:
  28.        WORDPRESS_DB_HOST: db:3306
  29.        WORDPRESS_DB_USER: wordpress
  30.        WORDPRESS_DB_PASSWORD: wordpress
  31.        WORDPRESS_DB_NAME: wordpress
  32. volumes:
  33.     db_data: {}
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top