Oli_Mo

Website Docker-Compose

Aug 5th, 2021
820
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. version: '3.5'
  2.  
  3. services:
  4.   mysql:
  5.     container_name: wordpress_mysql
  6.     image: mysql:8.0.25
  7.     restart: always
  8.     networks:
  9.      - wordpress
  10.     environment:
  11.      - "MYSQL_DATABASE=${DB_NAME}"
  12.       - "MYSQL_USER=${DB_USER}"
  13.       - "MYSQL_PASSWORD=${DB_PASSWORD}"
  14.       - "MYSQL_RANDOM_ROOT_PASSWORD=1"
  15.     volumes:
  16.      - ./mysql:/var/lib/mysql
  17.       - ./mysql-config/:/etc/mysql/conf.d/
  18.  
  19.   wordpress:
  20.     container_name: wordpress_wordpress
  21.     image: wordpress
  22.     depends_on:
  23.      - mysql
  24.     restart: always
  25.     networks:
  26.      - wordpress
  27.     ports:
  28.      - "${WORDPRESS_PORT}:80"
  29.     environment:
  30.      - WORDPRESS_DB_HOST=mysql
  31.       - "WORDPRESS_DB_NAME=${DB_NAME}"
  32.       - "WORDPRESS_DB_USER=${DB_USER}"
  33.       - "WORDPRESS_DB_PASSWORD=${DB_PASSWORD}"
  34.     volumes:
  35.      - ./wordpress:/var/www/html
  36.  
  37.   filebrowser:
  38.     container_name: wordpress_filebrowser
  39.     image: filebrowser/filebrowser:v2.15.0
  40.     depends_on:
  41.        - wordpress
  42.     environment:
  43.        - "VIRTUAL_HOST=${FILEBROWSER_VIRTUAL_HOST}"
  44.         - "VIRTUAL_PORT=${FILEBROWSER_PORT}"
  45.     ports:
  46.        - "${FILEBROWSER_PORT}:80"
  47.     volumes:
  48.        - './wordpress:/srv'
  49.         - './filebrowser/database.db:/database.db'
  50.  
  51.   phpmyadmin:
  52.     image: phpmyadmin:5.1.0
  53.     container_name: wordpress_phpmyadmin
  54.     depends_on:
  55.      - mysql
  56.     networks:
  57.      - wordpress
  58.     ports:
  59.      - "${PHPMYADMIN_PORT}:80"
  60.     environment:
  61.      - PMA_HOST=mysql
  62.  
  63. networks:
  64.   wordpress:
  65.     name: wordpress-network
RAW Paste Data