Hi!
We are using CircleCI for quite a while now, and we always used Apache based images with mod_php. We are now in the process of switching to Nginx+PHP-FPM which means having to different containers for Nginx and PHP.
in our local dev environment and on Kubernetes, I can easily share data between the two containers, either through a directory mapping, or a shared volume.
Now, on CircleCI, I have a main container (my PHP-FPM container), which does the git checkout. And the Nginx Containers runs alongside it (like mysq, ElasticSearch, etc.). Is there a way to share my application data between those 2 containers? Or even to copy it to the Nginx container?
My container setup so far is :
behat:
resource_class: large
parallelism: 6
docker:
- image: ${CONTAINER_REG_HOSTNAME}/my-fpm-container
auth:
username: ...
password: ...
environment:
- LISTEN_ON_ADDRESS=127.0.0.1
- image: ${CONTAINER_REG_HOSTNAME}/nginx:2.0.0
auth:
username: ...
password: ...
environment:
- NGINX_PORT=8090
- PHP_FPM_HOST=127.0.0.1
And the Nginx output is the following :
2024/03/12 10:56:53 [crit] 36#36: *2 realpath() "/var/www/html/public" failed (2: No such file or directory), client: 127.0.0.1, server: _, request: "GET /<my-route> HTTP/1.1", host: "127.0.0.1:8090"
because it’s looking for the folder /var/www/html/public
which isn’t there.
Any hint is appreciated,
thanks and best regards,
Pascal