Advertisement
fakesamgregory

Docker Compose for Wordpress

Sep 14th, 2022 (edited)
1,037
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 0.67 KB | None | 0 0
  1. version: '3.3'
  2. services:
  3.    db:
  4.      image: mariadb:latest
  5.      volumes:
  6.       - db_data:/var/lib/mysql
  7.      restart: always
  8.      environment:
  9.        MYSQL_ROOT_PASSWORD: somewordpress
  10.        MYSQL_DATABASE: wordpress
  11.        MYSQL_USER: wordpress
  12.        MYSQL_PASSWORD: wordpress
  13.    wordpress:
  14.      depends_on:
  15.       - db
  16.      image: wordpress:latest
  17.      ports:
  18.       - "8000:80"
  19.      restart: always
  20.      volumes:
  21.       - ./wp-content:/var/www/html/wp-content
  22.      environment:
  23.        WORDPRESS_DB_HOST: db:3306
  24.        WORDPRESS_DB_USER: wordpress
  25.        WORDPRESS_DB_PASSWORD: wordpress
  26.        WORDPRESS_DB_NAME: wordpress
  27. volumes:
  28.     db_data: {}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement