services:
  openresty:
    build:
      context: ./build
      args:
        - PANEL_OPENRESTY_VERSION=1.27.1.1-0-focal
        - RESTY_CONFIG_OPTIONS_MORE=${RESTY_CONFIG_OPTIONS_MORE}
        - RESTY_ADD_PACKAGE_BUILDDEPS=${RESTY_ADD_PACKAGE_BUILDDEPS}
        - CONTAINER_PACKAGE_URL=${CONTAINER_PACKAGE_URL}
    image: icontainer/openresty:1.27.1.1-0-focal
    container_name: ${CONTAINER_NAME}
    restart: always
    network_mode: host
    volumes:
      - ./conf/nginx.conf:/usr/local/openresty/nginx/conf/nginx.conf
      - ./conf/fastcgi_params:/usr/local/openresty/nginx/conf/fastcgi_params
      - ./conf/fastcgi-php.conf:/usr/local/openresty/nginx/conf/fastcgi-php.conf
      - ./conf/mime.types:/usr/local/openresty/nginx/conf/mime.types
      - ./conf/conf.d:/usr/local/openresty/nginx/conf/default/
      - ./log:/var/log/nginx
      - /var/run/php-sockets:/var/run/php-sockets
      - ./root:/usr/share/nginx/html
      - /etc/localtime:/etc/localtime
      - ./${WEBSITE_DIR}:/www
      - ./conf/conf.d:/usr/local/openresty/nginx/conf/conf.d/
      - ./conf/conf.d/users:/usr/local/openresty/nginx/conf/conf.d/
    labels:
      createdBy: "icontainer"