version: '3.4'
services:
  swoole:
    container_name: "swoole"
    image: "phpswoole/php:${PHP_VERSION}"
    volumes:
      - "${SWOOLE_BUILD_DIR}:/swoole-src:rw"
    working_dir: /swoole-src
    ulimits:
      core: -1
    privileged: true
    depends_on:
      - mysql
      - redis
      - pgsql
      - oracle
    dns:
      - 8.8.8.8
      - 1.1.1.1
    environment:
      SWOOLE_BRANCH: "${SWOOLE_BRANCH}"
    command: tail -f /etc/group
  mysql:
    container_name: "mysql"
    image: "phpswoole/mysql:5.6"
    volumes:
      - ./data/mysql:/var/lib/mysql:rw
      - ./data/run/mysqld:/var/run/mysqld:rw
    environment:
      MYSQL_ROOT_PASSWORD: root
      MYSQL_DATABASE: test
      MYSQL_USER: swoole
      MYSQL_PASSWORD: swoole
  pgsql:
    image: postgres:14
    container_name: "pgsql"
    environment:
      POSTGRES_USER: root
      POSTGRES_DB: test
      POSTGRES_PASSWORD: root
  oracle:
    image: gvenzl/oracle-free:slim
    container_name: "oracle"
    environment:
      ORACLE_PASSWORD: oracle
    ports:
      - "1521:1521"
  redis:
    container_name: "redis"
    image: "phpswoole/redis:latest"
    volumes:
      - ./data/redis:/var/lib/redis:rw
      - ./data/run/redis:/var/run/redis:rw
    sysctls:
        net.core.somaxconn: 65535
  httpbin:
    container_name: "httpbin"
    image: "kennethreitz/httpbin"
  tinyproxy:
    container_name: "tinyproxy"
    image: "vimagick/tinyproxy"
  golang-h2demo:
    container_name: "golang-h2demo"
    image: "phpswoole/golang-h2demo"
  socks5:
    container_name: "socks5"
    image: "xkuma/socks5"
  ftp:
    container_name: "ftp"
    image: "fauria/vsftpd"
    environment:
      FTP_USER: admin
      FTP_PASS: admin

