Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- version: '3.5'
- services:
- wordpress:
- image: wordpress-with-theme
- build: <git-repo-here>
- restart: unless-stopped
- depends_on:
- - database
- healthcheck:
- test: ["CMD", "curl", "-f", "http://localhost"]
- interval: 15s
- timeout: 15s
- retries: 3
- environment:
- - WORDPRESS_DB_NAME=testing
- - WORDPRESS_DB_USER=testing
- - WORDPRESS_DB_PASSWORD=testing
- - WORDPRESS_DB_HOST=database
- volumes:
- - "./conf/back/custom.ini:/usr/local/etc/php/conf.d/custom.ini:z" # DO NOT REMOVE! Necessary PHP settings
- - "backend-theme:/var/www/html/wp-content/themes/theme" # DO NOT REMOVE! Needed for docker-based theme
- - "backend-content:/var/www/html/wp-content" # DO NOT REMOVE! Data persistence for plugins, uploads and other folders
- - "backend-root:/var/www/html" # DO NOT REMOVE! Needed for wp-cli
- database:
- image: mariadb:10
- restart: unless-stopped
- healthcheck:
- test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
- interval: 15s
- timeout: 5s
- retries: 3
- environment:
- - MYSQL_RANDOM_ROOT_PASSWORD=yes
- - MYSQL_DATABASE=testing
- - MYSQL_USER=testing
- - MYSQL_PASSWORD=testing
- volumes:
- - "./import:/docker-entrypoint-initdb.d:Z"
- - "database:/var/lib/mysql"
- cli:
- image: wordpress:cli
- depends_on:
- - wordpress
- user: "33:33"
- working_dir: "/var/www/html"
- volumes:
- - "./conf/back/custom.ini:/usr/local/etc/php/conf.d/custom.ini:z" # DO NOT REMOVE! Necessary PHP settings
- - "backend-theme:/var/www/html/wp-content/themes/theme" # DO NOT REMOVE! Needed for docker-based theme
- - "backend-content:/var/www/html/wp-content" # DO NOT REMOVE! Data persistence for plugins, uploads and other folders
- - "backend-root:/var/www/html" # DO NOT REMOVE! Needed for wp-cli
- volumes:
- database:
- backend-content:
- backend-root:
- backend-theme:
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement