16
votes
Accepted
What is the difference between php-cli and php-fpm, why 2 php variants and why choose one or the other?
They are different tools for different purposes:
php-cli is the standalone tool for running a PHP scripts in the same way you would run it from the command line: php somescript.php. It seems you can ...
11
votes
Accepted
What is the purpose of running PHP-FPM in its own container instead in the same container as apache2/nginx?
Im heavily investigating this, and like many people, im discovering that in 2020 there doesn't seem to be so much logic in separating tightly coupled webserver + PHP + app process/code from each other:...
10
votes
Accepted
Problem in integrating Travis-CI with core PHP projects
You need to write some unit tests and set the script variable in your .travis.yml to actually run a file.
By default, Travis CI runs the command phpunit without any arguments. When this happens, ...
3
votes
What is the purpose of running PHP-FPM in its own container instead in the same container as apache2/nginx?
Separation of concerns is quite a strong reason to keep web server and php-fpm on separate containers, especially in Kubernetes.
Containers can be created and maintained by separated teams (PHP by ...
3
votes
Accepted
Is there a php (or composer) command to change upload_max_filesize && post_max_size from terminal?
The reason; having a more a version-agnostic and more
backward-compatible directive in my server-environment-establishment
script, to change the values of these two variables.
If you're trying to ...
3
votes
Where to start? Scaling PHP applications on AWS
Here's a rough approach to scaling any stateless app on AWS:
Run the app in an Auto Scaling Group (ASG). An ASG makes it easy to manage multiple servers, will automatically replace failed servers, ...
2
votes
Shell Scripting
Please provide more information about the method and the result as Husyn asked, it may be more suited to programming SO if it is PHP related. Anyway:
<?php should be present at the start of any ...
2
votes
Accepted
Automating the creation of an Apache virtual-host file specifically
This has already been covered a bit in the comments, but I figured I'd lay out a more extensive answer.
Is there a way to automate that / shorten the amount of lines code (the actual script-file is ...
2
votes
Accepted
docker container does not open port for php:latest
Try to use php -S 0.0.0.0:8080:
docker run --name php -v $(pwd):/app -w /app -p 8080:8080 -d --rm php:cli php -S 0.0.0.0:8080 -t . index.php
Explanation:
The localhost(or 127.0.0.1) address is ...
2
votes
Accepted
Why does php-fpm show nginx's IP while they are on different containers?
The SERVER_ADDR is a FastCGI variable that is being set inside the fastcgi_params file as
fastcgi_param SERVER_ADDR $server_addr;
The $server_addr nginx variable description says it contains ...
1
vote
Is there a Way to Run a Docker Image without installing it in server?
It is possible to run containers as a regular user using podman (buzzword: rootless).
Note that while podman is based on the same OCI standard as docker, there are some differences in the details. For ...
1
vote
ansible-playbook: how to dynamically, conditionally set a large deployment environment (variable space) in a playbook?
Yes, an input host file for ansible looks like https://pastebin.com/Vtfw5FtV
The upper part node stuff is generated using terraform, we can dynamically up/down scale the number of nodes with terraform ...
1
vote
Do I need header files once I install the php extention on Dockerfile?
You shouldn't need to statically link things to remove the *-dev packages and have everything still work. If you do, then that's a bug in the base package and the -dev package and should be reported ...
1
vote
How to find the PHP version that is used by the latest `phpdoc/phpdoc` docker image?
The Dockerfile provided in the Q&A indicates that the image uses the latest php:7 as a base image. One could inspect the version as follows:
docker run -it php:7 php -v
Result
PHP 7.3.11 (...
1
vote
Can Cypress with cucumber replace php unit and regression tests in CI/Cd pipeline?
Yes Cypress is capable to run in CI.
https://docs.cypress.io/guides/guides/continuous-integration.html#Record-tests
Most of the time it is just running cypress run. In our case we ran the docker ...
1
vote
Accepted
How do -dev apk packages differ on Alpine for the purposes of creating docker images?
dev packages are typically intended for development and build purposes. They usually contain header files and other resources for providing programmer APIs. For example, python-dev contains C headers ...
1
vote
Install MDB2 in docker container while PEAR is down
You need to learn a bit more about Debian or Ubuntu. If you look at every single Debian or Ubuntu container that installs things, you will notice, amongst other things:
apt-get update && apt -...
1
vote
PHP-FPM with Nginx in different containers (share init.d response between)
Here is nginx and php done as an s2i builder image. You can basically have plain old php in a git repo and run s2i to make a runtime image that runs it with nginx and php. You simply docker build that ...
1
vote
I trying on Windows 10, Trying to connect / login to work interactively on container but I'm getting this kind of error
Restart docker, it falls into this state after the OS reboots.
The below thread mentions running it a swarm as preventing the issue from reoccurring and several ways to resolve the underlying OS ...
1
vote
Is there a php (or composer) command to change upload_max_filesize && post_max_size from terminal?
PHP has supported conf.d configuration subdirectories for ages now (cf. PHP_INI_SCAN_DIR in its documentation, this stuff is as old as PHP 5 basically) - allowing you to simply add a small file ...
1
vote
How can I diagnose php cli command execution time inside a docker container
The general process of debugging inside the container is the same as debugging outside of one. The only thing that you generally need to know is that you can use docker exec to attach a bash shell ...
1
vote
Multi-container server of PHP apps with reverse proxy?
Problem is in resources - I see that each app container has own nginx instance, and server (VPS) must have global nginx, working as reverse proxy for containers.
Generally speaking yes, this is how ...
1
vote
Accepted
Continuous delivery workflow: Build script for PHP Composer (Drupal) on Docker
Each CI/CD system is different when it comes to performing the job(s) that the execution pipeline consists of. In most (if not all) cases the details are part of a configuration which is specific to ...
1
vote
How to automatically publish git releases/comments to the site?
We did have a similar situation and did try out a few options. Let me suggest them and you can choose if they suit your need.
We had Jira for User Story (requirements), Bitbucket for SCM, Jenkins for ...
1
vote
Apache container cant access php files mounted in /var/www/ - 403 error
SELinux prevent the docker filesystem to work in the intended way, to fix this issue just add the :Z flag at the end of the volume declaration. It goes something like this:
docker run -d -p 8080:80 -...
1
vote
Where to start? Scaling PHP applications on AWS
Currently all of our PHP (Laravel) applications are running on one EC2 instance. To deploy code, we SSH onto the live box and pull from CodeCommit.
The first thing you need to decide on is a ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
php × 26docker × 19
nginx × 4
apache-httpd × 4
composer × 3
amazon-web-services × 2
continuous-deployment × 2
dockerfile × 2
bash × 2
shell-script × 2
ansible × 1
continuous-integration × 1
docker-compose × 1
git × 1
amazon-ec2 × 1
deployment × 1
linux × 1
cicd × 1
github × 1
networking × 1
configuration-management × 1
load-balance × 1
autoscaling × 1
travis-ci × 1
images × 1