summaryrefslogtreecommitdiffstats
path: root/test/compose.yml
blob: ff0cbdd70f86a603058f31cdb02842eedc9d33a9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: cepis-woocommerce-test

services:
  db:
    image: mysql:8
    environment:
      MYSQL_ROOT_PASSWORD: wordpress
      MYSQL_DATABASE: wordpress
      MYSQL_USER: wordpress
      MYSQL_PASSWORD: wordpress
    healthcheck:
      test: ["CMD", "mysqladmin", "ping", "-h", "127.0.0.1", "-uwordpress", "-pwordpress"]
      interval: 3s
      timeout: 5s
      retries: 30

  wordpress:
    image: wordpress:latest
    depends_on:
      db:
        condition: service_healthy
    ports:
      - "8090:80"
    extra_hosts:
      - "fakecep:host-gateway"
    environment:
      WORDPRESS_DB_HOST: db:3306
      WORDPRESS_DB_USER: wordpress
      WORDPRESS_DB_PASSWORD: wordpress
      WORDPRESS_DB_NAME: wordpress
      WORDPRESS_DEBUG: "1"
      WORDPRESS_CONFIG_EXTRA: |
        define( 'WP_DEBUG', true );
        define( 'WP_DEBUG_LOG', true );
        define( 'WP_DEBUG_DISPLAY', false );
        define( 'SCRIPT_DEBUG', true );
        define( 'DISABLE_WP_CRON', true );
    volumes:
      - wp:/var/www/html
      - ..:/var/www/html/wp-content/plugins/cepis-woocommerce

  cli:
    image: wordpress:cli
    depends_on:
      - wordpress
    user: "33:33"
    extra_hosts:
      - "fakecep:host-gateway"
    environment:
      WORDPRESS_DB_HOST: db:3306
      WORDPRESS_DB_USER: wordpress
      WORDPRESS_DB_PASSWORD: wordpress
      WORDPRESS_DB_NAME: wordpress
      WP_CLI_CACHE_DIR: /tmp/wp-cli-cache
    volumes:
      - wp:/var/www/html
      - ..:/var/www/html/wp-content/plugins/cepis-woocommerce
    entrypoint: ["tail", "-f", "/dev/null"]

volumes:
  wp: