Dockerfile 699 B

12345678910111213141516
  1. FROM ghcr.io/roadrunner-server/roadrunner:2023.2.1 AS roadrunner
  2. FROM composer:2.4.4 AS composer
  3. FROM php:8.2.8-cli-alpine
  4. COPY --from=composer /usr/bin/composer /usr/bin/composer
  5. COPY --from=roadrunner /usr/bin/rr /usr/local/bin/rr
  6. RUN apk add --no-cache linux-headers unzip && docker-php-ext-install -j$(nproc) sockets
  7. WORKDIR /app
  8. COPY . /app
  9. RUN composer install --prefer-dist --optimize-autoloader && composer require --prefer-dist --optimize-autoloader spiral/roadrunner-http nyholm/psr7 nikic/fast-route
  10. ENTRYPOINT rr --WorkDir /app serve
  11. # Service starts at 8080 port in container
  12. # So make sure use of this port
  13. EXPOSE 8080
  14. ENV NUM_WORKERS 4
  15. ENV NUM_REQUESTS_BEFORE_RESET 0
  16. ENV DEBUG false