Git Product home page Git Product logo

stack-runtimes's People

Contributors

alexvanderbist avatar amecea avatar anddon avatar bogdanpetrea avatar calind avatar lukeabell avatar vtemian avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

stack-runtimes's Issues

access forbidden by rule

The WordPress pod crashes because the readiness probe fails to ping the nginx server. I get the following error.

Sun, Dec 13 2020 9:11:07 pm | 2020/12/14 03:11:07 [error] 52#52: *93 access forbidden by rule, client: 178.128.11.1, server: tmp-wordpress-wordpress-5f75494c76-gcx65, request: "GET /-/php-ping HTTP/1.1", host: "10.42.1.159:8080"
Sun, Dec 13 2020 9:11:12 pm | 2020/12/14 03:11:12 [error] 52#52: *136 access forbidden by rule, client: 178.128.11.1, server: tmp-wordpress-wordpress-5f75494c76-gcx65, request: "GET /-/php-ping HTTP/1.1", host: "10.42.1.159:8080"
Sun, Dec 13 2020 9:11:17 pm | 2020/12/14 03:11:17 [error] 52#52: *179 access forbidden by rule, client: 178.128.11.1, server: tmp-wordpress-wordpress-5f75494c76-gcx65, request: "GET /-/php-ping HTTP/1.1", host: "10.42.1.159:8080"

Expect

WordPress to run without crashing.

Reproduce

Create WordPress CRD on kubernetes using wordpress operator.

Below is the full log.

time="2020-12-14T03:10:55Z" level=info msg="create process:php-fpm"
--
Sun, Dec 13 2020 9:10:55 pm | time="2020-12-14T03:10:55Z" level=info msg="create process:nginx"
Sun, Dec 13 2020 9:10:55 pm | time="2020-12-14T03:10:55Z" level=info msg="stop listening"
Sun, Dec 13 2020 9:10:55 pm | time="2020-12-14T03:10:55Z" level=info msg="try to start program" program=php-fpm
Sun, Dec 13 2020 9:10:55 pm | time="2020-12-14T03:10:55Z" level=info msg="try to start program" program=nginx
Sun, Dec 13 2020 9:10:55 pm | time="2020-12-14T03:10:55Z" level=info msg="success to listen on address" addr="127.0.0.1:9001" protocol=tcp
Sun, Dec 13 2020 9:10:55 pm | time="2020-12-14T03:10:55Z" level=debug msg="wait program exit" program=php-fpm
Sun, Dec 13 2020 9:10:55 pm | time="2020-12-14T03:10:55Z" level=debug msg="wait program exit" program=nginx
Sun, Dec 13 2020 9:10:55 pm | [start-nginx] Initiated start-nginx.sh script.
Sun, Dec 13 2020 9:10:55 pm | 2020/12/14 03:10:55 Waiting for: unix:///var/run/php-www.sock
Sun, Dec 13 2020 9:10:55 pm | 2020/12/14 03:10:55 Problem with dial: dial unix /var/run/php-www.sock: connect: no such file or directory. Sleeping 1s
Sun, Dec 13 2020 9:10:55 pm | [14-Dec-2020 03:10:55] NOTICE: fpm is running, pid 29
Sun, Dec 13 2020 9:10:55 pm | [14-Dec-2020 03:10:55] NOTICE: ready to handle connections
Sun, Dec 13 2020 9:10:56 pm | time="2020-12-14T03:10:56Z" level=info msg="success to start program" program=php-fpm
Sun, Dec 13 2020 9:10:56 pm | time="2020-12-14T03:10:56Z" level=info msg="success to start program" program=nginx
Sun, Dec 13 2020 9:10:56 pm | 2020/12/14 03:10:56 Connected to unix:///var/run/php-www.sock
Sun, Dec 13 2020 9:10:56 pm | 2020/12/14 03:10:56 [notice] 48#48: using the "epoll" event method
Sun, Dec 13 2020 9:10:56 pm | 2020/12/14 03:10:56 [notice] 48#48: openresty/1.13.6.2
Sun, Dec 13 2020 9:10:56 pm | 2020/12/14 03:10:56 [notice] 48#48: OS: Linux 5.4.0-51-generic
Sun, Dec 13 2020 9:10:56 pm | 2020/12/14 03:10:56 [notice] 48#48: getrlimit(RLIMIT_NOFILE): 1048576:1048576
Sun, Dec 13 2020 9:10:56 pm | 2020/12/14 03:10:56 [notice] 48#48: start worker processes
Sun, Dec 13 2020 9:10:56 pm | 2020/12/14 03:10:56 [notice] 48#48: start worker process 49
Sun, Dec 13 2020 9:10:56 pm | 2020/12/14 03:10:56 [notice] 48#48: start worker process 50
Sun, Dec 13 2020 9:10:56 pm | 2020/12/14 03:10:56 [notice] 48#48: start worker process 51
Sun, Dec 13 2020 9:10:56 pm | 2020/12/14 03:10:56 [notice] 48#48: start worker process 52
Sun, Dec 13 2020 9:11:07 pm | 2020/12/14 03:11:07 [error] 52#52: *93 access forbidden by rule, client: 178.128.11.1, server: tmp-wordpress-wordpress-5f75494c76-gcx65, request: "GET /-/php-ping HTTP/1.1", host: "10.42.1.159:8080"
Sun, Dec 13 2020 9:11:12 pm | 2020/12/14 03:11:12 [error] 52#52: *136 access forbidden by rule, client: 178.128.11.1, server: tmp-wordpress-wordpress-5f75494c76-gcx65, request: "GET /-/php-ping HTTP/1.1", host: "10.42.1.159:8080"
Sun, Dec 13 2020 9:11:17 pm | 2020/12/14 03:11:17 [error] 52#52: *179 access forbidden by rule, client: 178.128.11.1, server: tmp-wordpress-wordpress-5f75494c76-gcx65, request: "GET /-/php-ping HTTP/1.1", host: "10.42.1.159:8080"
Sun, Dec 13 2020 9:11:18 pm | [14-Dec-2020 03:11:18] NOTICE: [pool www-async] child 44 exited with code 0 after 22.602159 seconds from start
Sun, Dec 13 2020 9:11:18 pm | time="2020-12-14T03:11:18Z" level=info msg="receive a signal to stop all process & exit" signal=terminated
Sun, Dec 13 2020 9:11:18 pm | time="2020-12-14T03:11:18Z" level=info msg="stop the program" program=nginx
Sun, Dec 13 2020 9:11:18 pm | time="2020-12-14T03:11:18Z" level=info msg="send stop signal to program" program=nginx signal=QUIT
Sun, Dec 13 2020 9:11:18 pm | time="2020-12-14T03:11:18Z" level=info msg="stop the program" program=php-fpm
Sun, Dec 13 2020 9:11:18 pm | [start-nginx] Stopping nginx.
Sun, Dec 13 2020 9:11:18 pm | [start-nginx] Killing subprocesses of process 28.
Sun, Dec 13 2020 9:11:18 pm | time="2020-12-14T03:11:18Z" level=info msg="send stop signal to program" program=php-fpm signal=QUIT
Sun, Dec 13 2020 9:11:18 pm | [start-php-fpm] Waiting for nginx to stop.
Sun, Dec 13 2020 9:11:18 pm | [14-Dec-2020 03:11:18] NOTICE: [pool www-async] child 59 started
Sun, Dec 13 2020 9:11:18 pm | 2020/12/14 03:11:18 [notice] 48#48: signal 3 (SIGQUIT) received from 62, shutting down
Sun, Dec 13 2020 9:11:18 pm | 2020/12/14 03:11:18 [notice] 52#52: gracefully shutting down
Sun, Dec 13 2020 9:11:18 pm | 2020/12/14 03:11:18 [notice] 51#51: gracefully shutting down
Sun, Dec 13 2020 9:11:18 pm | 2020/12/14 03:11:18 [notice] 51#51: exiting
Sun, Dec 13 2020 9:11:18 pm | 2020/12/14 03:11:18 [notice] 52#52: exiting
Sun, Dec 13 2020 9:11:18 pm | 2020/12/14 03:11:18 [notice] 52#52: exit
Sun, Dec 13 2020 9:11:18 pm | 2020/12/14 03:11:18 [notice] 51#51: exit
Sun, Dec 13 2020 9:11:18 pm | 2020/12/14 03:11:18 [notice] 50#50: gracefully shutting down
Sun, Dec 13 2020 9:11:18 pm | 2020/12/14 03:11:18 [notice] 50#50: exiting
Sun, Dec 13 2020 9:11:18 pm | 2020/12/14 03:11:18 [notice] 48#48: signal 17 (SIGCHLD) received from 52
Sun, Dec 13 2020 9:11:18 pm | 2020/12/14 03:11:18 [notice] 48#48: worker process 52 exited with code 0
Sun, Dec 13 2020 9:11:18 pm | 2020/12/14 03:11:18 [notice] 48#48: signal 29 (SIGIO) received
Sun, Dec 13 2020 9:11:18 pm | 2020/12/14 03:11:18 [notice] 50#50: exit
Sun, Dec 13 2020 9:11:18 pm | 2020/12/14 03:11:18 [notice] 48#48: signal 17 (SIGCHLD) received from 50
Sun, Dec 13 2020 9:11:18 pm | 2020/12/14 03:11:18 [notice] 48#48: worker process 50 exited with code 0
Sun, Dec 13 2020 9:11:18 pm | 2020/12/14 03:11:18 [notice] 48#48: signal 29 (SIGIO) received
Sun, Dec 13 2020 9:11:18 pm | 2020/12/14 03:11:18 [notice] 48#48: signal 17 (SIGCHLD) received from 51
Sun, Dec 13 2020 9:11:18 pm | 2020/12/14 03:11:18 [notice] 49#49: gracefully shutting down
Sun, Dec 13 2020 9:11:18 pm | 2020/12/14 03:11:18 [notice] 48#48: worker process 51 exited with code 0
Sun, Dec 13 2020 9:11:18 pm | 2020/12/14 03:11:18 [notice] 48#48: signal 29 (SIGIO) received
Sun, Dec 13 2020 9:11:18 pm | 2020/12/14 03:11:18 [notice] 49#49: exiting
Sun, Dec 13 2020 9:11:18 pm | 2020/12/14 03:11:18 [notice] 49#49: exit
Sun, Dec 13 2020 9:11:18 pm | 2020/12/14 03:11:18 [notice] 48#48: signal 17 (SIGCHLD) received from 49
Sun, Dec 13 2020 9:11:18 pm | 2020/12/14 03:11:18 [notice] 48#48: worker process 49 exited with code 0
Sun, Dec 13 2020 9:11:18 pm | 2020/12/14 03:11:18 [notice] 48#48: exit
Sun, Dec 13 2020 9:11:18 pm | [start-nginx] Stopped nginx.
Sun, Dec 13 2020 9:11:18 pm | [start-php-fpm] Stopping php-fpm.
Sun, Dec 13 2020 9:11:18 pm | [14-Dec-2020 03:11:18] NOTICE: Finishing ...
Sun, Dec 13 2020 9:11:18 pm | [14-Dec-2020 03:11:18] NOTICE: exiting, bye-bye!
Sun, Dec 13 2020 9:11:18 pm | time="2020-12-14T03:11:18Z" level=info msg="program stopped with status:exit status 0" program=nginx
Sun, Dec 13 2020 9:11:18 pm | time="2020-12-14T03:11:18Z" level=info msg="program exited" program=nginx
Sun, Dec 13 2020 9:11:18 pm | time="2020-12-14T03:11:18Z" level=info msg="Stopped by user, don't start it again" program=nginx
Sun, Dec 13 2020 9:11:18 pm | [start-php-fpm] Stopped php-fpm.
Sun, Dec 13 2020 9:11:18 pm | time="2020-12-14T03:11:18Z" level=info msg="program stopped with status:exit status 0" program=php-fpm
Sun, Dec 13 2020 9:11:18 pm | time="2020-12-14T03:11:18Z" level=info msg="program exited" program=php-fpm
Sun, Dec 13 2020 9:11:18 pm | time="2020-12-14T03:11:18Z" level=info msg="Stopped by user, don't start it again" program=php-fpm

Pass basic-auth credentials to child images

Is your feature request related to a problem? Please describe.

When attempting to get basic auth working with the satispress plugin I am running into some issues.

As part of my build process I do composer update and then, docker build . --file Dockerfile --tag image:tag and it works well, but when I attempt to add packages using satispress with composer and an accompanying auth.json that sits next to composer.json for basic-auth I get the following error.

 [Composer\Downloader\TransportException]                                                                 
  The 'https://mydomain.com/satispress/affiliate-wp/2.6.3' URL required authentication.  
  You must be using the interactive console to authenticate                                                
                                                                                                           

install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--no-suggest] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--ignore-platform-reqs] [--] [<packages>]...

The command '/bin/bash -o pipefail -c composer install --no-dev --no-interaction --no-progress --no-ansi --no-scripts' returned a non-zero code: 255

I'm thinking auth credentials are never picked up as part of the build. It looks like there is a way to set up the auth with the COMPOSER_AUTH environment variable as part of the build but don't know if there is a way to inject this into the Docker build.

Describe the solution you'd like

Ideally a build arg for enabling a way to pass COMPOSER_AUTH with specified credentials in the child Dockerfile. Something like docker build . --file Dockerfile --build-arg COMPOSER_AUTH='{"http-basic": {"domain": {"username": "abc", "password": "123"}}}' --tag image:tag and something in the Dockerfile for passing the onbuild env.

It looks like passing this arg should be possible using this approach.

Additional context

I originally opened an issue in the stack-example-bedrock repo but it looks like that is probably not the best place for it. I'm still parsing through the repo trying to understand how everything is built so I can try testing this locally.

Allow passing COMPOSER_AUTH from bedrock builder

www.inanzzz.com/index.php/post/j1o8/using-private-github-repositories-with-composer-in-docker-applications

FROM quay.io/presslabs/wordpress-runtime:bedrock as builder
ARG COMPOSER_AUTH={}
ENV COMPOSER_AUTH=${COMPOSER_AUTH}
WORKDIR /src
COPY --chown=www-data:www-data composer.json composer.lock /src/
RUN composer install --no-dev --no-interaction --no-progress --no-ansi --no-scripts
COPY --chown=www-data:www-data . /src
RUN composer install --no-dev --no-interaction --no-progress --no-ansi --no-scripts
RUN cp -a /src/. /app
FROM quay.io/presslabs/wordpress-runtime:bedrock
COPY --from=builder --chown=www-data:www-data /app /app

request_method could be removed from cache key

Realistically only GET requests are being cached, so there's very little reason to have it in the first place.

  • remove request_method from nginx conf files
  • remove request_method from nginx-helper

Add ARM64 support

Build the docker images for ARM64, specifically would like to use the bedrock related images on apple's m1 processors.

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.