Closed idc77 closed 11 months ago
Ok I got it to work. I had to make the host's mysqld listen on the docker0 iface and change the user to be able to connect from %. I didn't have to expose the mysql.socket because it's not used, but I had to adjust the mysql host params in the app's config.
Entering the docker image:
docker exec -it <image_name> sh
I also had to chown 82:82 ./htdocs aka the root of the app. 82 is the www-data user and group id.
And now i'll rebuild the thing with prod php.ini
FROM php:7.4-fpm-alpine
RUN apk add --update --no-cache libgd libpng-dev libjpeg-turbo-dev freetype-dev
RUN apk add --no-cache --upgrade grep
RUN docker-php-ext-install -j$(nproc) mysqli opcache gd pdo pdo_mysql
RUN cp "$PHP_INI_DIR/php.ini-production" "$PHP_INI_DIR/php.ini"
#RUN cp "$PHP_INI_DIR/php.ini-development" "$PHP_INI_DIR/php.ini"
WORKDIR /var/www/example.com/htdocs
docker run -d --restart always -p 127.0.0.1:9004:9000 -v /var/www/example.com/htdocs:/var/www/example.com/htdocs p74fpm:latest
Sorry, but I need help.
I had to upgrade my server to use openssl 3, thus I had to remove PHP7.4 from the system. Now I'd like to use docker and this whatever it is, to act as a php-fpm proxy. The system has nginx installed natively, this symfony app uses mysql, which is also installed natively, os packages.
So far I have
Then I
and run, but
The host's nginx
This vhost.conf file worked when php-fpm7.4 was installed natively.
But, I'm blind.
I run the built image with