services:
  openresty:
    build:
      context: ./build
      args:
        - PANEL_OPENRESTY_VERSION=1.31.1.1-2-4-noble
        - RESTY_CONFIG_OPTIONS_MORE=${RESTY_CONFIG_OPTIONS_MORE}
        - RESTY_ADD_PACKAGE_BUILDDEPS=${RESTY_ADD_PACKAGE_BUILDDEPS}
        - CONTAINER_PACKAGE_URL=${CONTAINER_PACKAGE_URL}
    image: 1panel/openresty:1.31.1.1-2-4-noble
    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/default:/usr/local/openresty/nginx/conf/default/
      - ./conf/ssl:/usr/local/openresty/nginx/conf/ssl/
      - ./conf/modules-enabled:/usr/local/openresty/nginx/conf/modules-enabled/:ro
      - ./conf/http.d:/usr/local/openresty/nginx/conf/http.d/:ro
      - ./modules:/usr/local/openresty/nginx/modules/1panel/:ro
      - ./log:/var/log/nginx
      - ./root:/usr/share/nginx/html
      - /etc/localtime:/etc/localtime
      - ./1pwaf/data:/usr/local/openresty/1pwaf/data
      - ${WEBSITE_DIR}:/www
      - ${WEBSITE_DIR}/conf.d:/usr/local/openresty/nginx/conf/conf.d/
      - ${WEBSITE_DIR}/stream.d:/usr/local/openresty/nginx/conf/stream.d/
    labels:
      createdBy: "Apps"