version: '2.2'
services:
  nginx:
    image: nginx:1.20
    volumes:
      - ./etc/nginx/conf.d:/etc/nginx/conf.d
      - ./public:/public
    ports:
      - "80:80"
    links:
      - app

  app:
    cpus: 1
    mem_limit: 1g
    # Go実装の場合は golang/ PHP実装の場合は php/
    build: ruby/
    environment:
      ISUCONP_DB_HOST: mysql
      ISUCONP_DB_PORT: 3306
      ISUCONP_DB_USER: root
      ISUCONP_DB_PASSWORD: root
      ISUCONP_DB_NAME: isuconp
      ISUCONP_MEMCACHED_ADDRESS: memcached:11211
    links:
      - mysql
      - memcached
    volumes:
      - ./public:/home/public
    init: true

  mysql:
    cpus: 1
    mem_limit: 1g
    image: mysql/mysql-server:8.0
    environment:
      - "TZ=Asia/Tokyo"
      - "MYSQL_ROOT_HOST=%"
      - "MYSQL_ROOT_PASSWORD=root"
    volumes:
      - mysql:/var/lib/mysql
      - ./etc/my.cnf:/etc/my.cnf
      - ./sql:/docker-entrypoint-initdb.d
    ports:
      - "3306:3306"

  memcached:
    image: memcached:1.6

volumes:
  mysql:

version: '2.2'
services:
  nginx:
    image: nginx:1.22
    volumes:
      - ./etc/nginx/conf.d:/etc/nginx/conf.d
      - ./public:/public
    ports:
      - "80:80"
    links:
      - app

  app:
    cpus: 1
    mem_limit: 1g
    # Go実装の場合は golang/ PHP実装の場合は php/
    build: ruby/
    environment:
      ISUCONP_DB_HOST: mysql
      ISUCONP_DB_PORT: 3306
      ISUCONP_DB_USER: root
      ISUCONP_DB_PASSWORD: root
      ISUCONP_DB_NAME: isuconp
      ISUCONP_MEMCACHED_ADDRESS: memcached:11211
    links:
      - mysql
      - memcached
    volumes:
      - ./public:/home/public
    init: true

  mysql:
    cpus: 1
    mem_limit: 1g
    image: mysql/mysql-server:8.0
    environment:
      - "TZ=Asia/Tokyo"
      - "MYSQL_ROOT_HOST=%"
      - "MYSQL_ROOT_PASSWORD=root"
    volumes:
      - mysql:/var/lib/mysql
      - ./etc/my.cnf:/etc/my.cnf
      - ./sql:/docker-entrypoint-initdb.d
    ports:
      - "3306:3306"

  memcached:
    image: memcached:1.6

volumes:
  mysql:

Update dependency nginx to v1.22
Update dependency nginx to v1.22
