View difference between Paste ID: bBktX2Q9 and dQLgmHgA
SHOW: | | - or go back to the newest paste.
1
version: '3.5'
2
3
services:
4
5
  wordpress:
6
    image: wordpress-with-theme
7
    build: <git-repo-here>
8
    restart: unless-stopped
9
    depends_on:
10
      - database
11
    healthcheck:
12
      test: ["CMD", "curl", "-f", "http://localhost"]
13
      interval: 15s
14
      timeout: 15s
15
      retries: 3
16
    environment:
17
      - WORDPRESS_DB_NAME=testing
18
      - WORDPRESS_DB_USER=testing
19
      - WORDPRESS_DB_PASSWORD=testing
20
      - WORDPRESS_DB_HOST=database
21
    volumes:
22
      - "./conf/back/custom.ini:/usr/local/etc/php/conf.d/custom.ini:z" # DO NOT REMOVE! Necessary PHP settings
23
      - "backend-theme:/var/www/html/wp-content/themes/theme"           # DO NOT REMOVE! Needed for docker-based theme
24
      - "backend-content:/var/www/html/wp-content"                      # DO NOT REMOVE! Data persistence for plugins, uploads and other folders
25
      - "backend-root:/var/www/html" # DO NOT REMOVE! Needed for wp-cli
26
27
  database:
28
    image: mariadb:10
29
    restart: unless-stopped
30
    healthcheck:
31
      test: ["CMD", "mysqladmin" ,"ping", "-h", "localhost"]
32
      interval: 15s
33
      timeout: 5s
34
      retries: 3
35
    environment:
36
      - MYSQL_RANDOM_ROOT_PASSWORD=yes
37
      - MYSQL_DATABASE=testing
38
      - MYSQL_USER=testing
39
      - MYSQL_PASSWORD=testing
40
    volumes:
41
      - "./import:/docker-entrypoint-initdb.d:Z"
42
      - "database:/var/lib/mysql"
43
44
  cli:
45
    image: wordpress:cli
46
    depends_on:
47
      - wordpress
48
    user: "33:33"
49
    working_dir: "/var/www/html"
50
    volumes:
51
      - "./conf/back/custom.ini:/usr/local/etc/php/conf.d/custom.ini:z" # DO NOT REMOVE! Necessary PHP settings
52
      - "backend-theme:/var/www/html/wp-content/themes/theme"           # DO NOT REMOVE! Needed for docker-based theme
53
      - "backend-content:/var/www/html/wp-content"                      # DO NOT REMOVE! Data persistence for plugins, uploads and other folders
54
      - "backend-root:/var/www/html" # DO NOT REMOVE! Needed for wp-cli
55
56
volumes:
57
  database:
58
  backend-content:
59
  backend-root:
60
  backend-theme: