Docker Compose – WordPress

Example Docker Compose file for WordPress

docker-compose.yaml

version: '3.7'

services:
  artem_wp:
    container_name: artem_wp
    image: wordpress:php7.3
    volumes:
      - "/var/www/html/docker:/var/www/html"
    restart: always
    ports:
      - "80:80"
    links:
      - artem_db
    depends_on:
      - artem_db

  artem_db:
    container_name: artem_db
    image: mariadb:10
    restart: always
    volumes:
      - "artem_db_data:/var/lib/mysql"
    environment:
      MYSQL_ROOT_PASSWORD: 'your_root_password'
      MYSQL_DATABASE: 'your_db_name'
      MYSQL_USER: 'your_user_name'
      MYSQL_PASSWORD: 'your_user_password'

volumes:
  artem_db_data:

Tagged: Tags

Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments