Code Monkey home page Code Monkey logo

docker-roadrunner-php's Introduction

Docker

Docker image configured for roadrunner in production use.

Docker images

Simple image with PHP, RoadRunner and pre-installed extensions:

  • spacetabio/roadrunner-alpine:8.0-base-1.11.0
    Docker Image Size (tag) Docker Image Version (tag latest semver)
  • spacetabio/roadrunner-alpine:8.1-base-1.11.0
    Docker Image Size (tag) Docker Image Version (tag latest semver)
  • spacetabio/roadrunner-alpine:8.2-base-1.11.0
    Docker Image Size (tag) Docker Image Version (tag latest semver)

With xdebug:

  • spacetabio/roadrunner-alpine:8.0-base-xdebug-1.11.0
    Docker Image Size (tag) Docker Image Version (tag latest semver)
  • spacetabio/roadrunner-alpine:8.1-base-xdebug-1.11.0
    Docker Image Size (tag) Docker Image Version (tag latest semver)
  • spacetabio/roadrunner-alpine:8.2-base-xdebug-1.11.0
    Docker Image Size (tag) Docker Image Version (tag latest semver)

Basic usage

Roadrunner:

FROM spacetabio/roadrunner-alpine:8.1-base-1.11.0

COPY . /app

# rr is pre installed but config should be provided by application. 
CMD ["rr", "serve", "-c", ".rr.yaml"]

Extensions

As default php-extensions are pre-installed:

  • opcache
  • pnctl
  • yaml
  • intl
  • sockets
  • gd
  • exif
  • zip
  • bcmath
  • grpc
  • event

Configure

You can configure php.ini options thought changing following env variables in your Dockerfile:

ENV PHP_MEMORY_LIMIT=-1
ENV PHP_MAX_EXECUTION_TIME=0
ENV PHP_MAX_INPUT_TIME=60
ENV PHP_ERROR_REPORTING="E_ALL & ~E_DEPRECATED & ~E_STRICT"
ENV PHP_DISPLAY_ERRORS=Off
ENV PHP_POST_MAX_SIZE=512M
ENV PHP_UPLOAD_MAX_FILESIZE=512M
ENV PHP_MAX_FILE_UPLOADS=20
ENV PHP_DEFAULT_MIMETYPE=application/json
ENV PHP_SESSION_STRICT_MODE=1
ENV PHP_SESSION_COOKIE_SECURE=1
ENV PHP_EXPOSE_PHP=Off
ENV PHP_DATE_TIMEZONE=UTC
ENV PHP_SHORT_OPEN_TAG=Off

ENV PHP_FFI_ENABLE=false
ENV PHP_FFI_PRELOAD=''
ENV PHP_OPCACHE_ENABLE=1
ENV PHP_OPCACHE_ENABLE_CLI=1
ENV PHP_OPCACHE_MEMORY_CONSUMPTION=512
ENV PHP_OPCACHE_INTERNED_STRINGS_BUFFER=16
ENV PHP_OPCACHE_MAX_ACCELERATED_FILES_AUTO=true
ENV PHP_OPCACHE_MAX_ACCELERATED_FILES=50000
ENV PHP_OPCACHE_REVALIDATE_FREQ=0
ENV PHP_OPCACHE_ENABLE_FILE_OVERRIDE=1
ENV PHP_OPCACHE_FILE_CACHE_ONLY=1

Version

Format: {phpVersion}-{imageType}-{semverImageVersion}

Map:

  • Image tag *-1.11.* contains RoadRunner 2023.1.1
  • Image tag *-1.10.* contains RoadRunner 2.12.2
  • Image tag *-1.9.* contains RoadRunner 2.11.4
  • Image tag *-1.8.* contains RoadRunner 2.7.3 and Spiral binary (in separate images).
  • Image tag *-1.7.* contains RoadRunner 2.5.6 and Spiral binary (in separate images).
  • Image tag *-1.6.* contains RoadRunner 2.4.2 and Spiral binary (in separate images).
  • Image tag *-1.5.* contains RoadRunner 2.3.3 and Spiral binary (in separate images).
  • Image tag *-1.4.* contains RoadRunner 2.3.3 and Spiral binary (in separate images).
  • Image tag *-1.3.* contains RoadRunner 2.3.3.
  • Image tag *-1.2.* contains RoadRunner 1.8.1.
  • Image tag *-1.1.* contains RoadRunner 1.9.0.
  • Image tag *-1.0.0 contains RoadRunner 1.9.0.

Build and push to docker hub

Shell bin/bash is required.

# make PUSH=true VERSION=latest base74
# make PUSH=true VERSION=latest base80
# make PUSH=true VERSION=latest base81
make PUSH=true VERSION=latest base82

Changelog

License

The MIT License

Copyright © 2023 spacetab.io, Inc. https://spacetab.io

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

docker-roadrunner-php's People

Contributors

roquie avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

docker-roadrunner-php's Issues

EXPOSE 2112

Is it possible to expose port 2112? Spiral uses this port by defaul for prometheus metrics.

Look at metrics section of config

Missing rr binary in 8.x spiral version

Hello, I used the minimum Dockerfile recommended in readme to build an image:

FROM spacetabio/roadrunner-alpine:8.0-spiral-1.8.0
COPY . /app
CMD ["rr", "serve", "-c", ".rr.yaml"]

Versions:

  • spacetabio/roadrunner-alpine:8.1-spiral-1.8.0
  • spacetabio/roadrunner-alpine:8.0-spiral-1.8.0

are erroring out with the message

/configure.sh: exec: line 13: rr: not found

Which I could also reproduce by not using it on a project, but rather simply doing docker build -t road . && docker exec -it road sh and then within the prompt running rr which would return a command not found error.

Am I doing something wrong or is this a known issue?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.