Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save icewind/9a7a73e15bb133629a8627f6d0a594d4 to your computer and use it in GitHub Desktop.
Save icewind/9a7a73e15bb133629a8627f6d0a594d4 to your computer and use it in GitHub Desktop.

Revisions

  1. @phuysmans phuysmans created this gist Jan 8, 2018.
    65 changes: 65 additions & 0 deletions gistfile1.txt
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,65 @@
    version: '2.1'
    services:
    php:
    tty: true
    build:
    context: .
    dockerfile: tests/Docker/Dockerfile-PHP
    args:
    version: cli
    volumes:
    - ./src:/var/www/src
    - ./tests:/var/www/tests
    - ./build:/var/www/build
    - ./phpunit.xml.dist:/var/www/phpunit.xml.dist
    depends_on:
    couchbase:
    condition: service_healthy
    memcached:
    condition: service_started
    mysql:
    condition: service_healthy
    postgresql:
    condition: service_healthy
    redis:
    condition: service_healthy
    couchbase:
    build:
    context: .
    dockerfile: tests/Docker/Dockerfile-Couchbase
    healthcheck:
    test: ["CMD", "curl", "-f", "http://Administrator:password@localhost:8091/pools/default/buckets/default"]
    interval: 1s
    timeout: 3s
    retries: 60
    memcached:
    image: memcached
    # not sure how to properly healthcheck
    mysql:
    image: mysql
    environment:
    - MYSQL_ALLOW_EMPTY_PASSWORD=yes
    - MYSQL_ROOT_PASSWORD=
    - MYSQL_DATABASE=cache
    healthcheck:
    test: ["CMD", "mysql" ,"-h", "mysql", "-P", "3306", "-u", "root", "-e", "SELECT 1", "cache"]
    interval: 1s
    timeout: 3s
    retries: 30
    postgresql:
    image: postgres
    environment:
    - POSTGRES_PASSWORD=
    - POSTGRES_DB=cache
    healthcheck:
    test: ["CMD", "pg_isready"]
    interval: 1s
    timeout: 3s
    retries: 30
    redis:
    image: redis
    healthcheck:
    test: ["CMD", "redis-cli", "ping"]
    interval: 1s
    timeout: 3s
    retries: 30