docker
docker copied to clipboard
How to change the default installation path [/var/www/html] ?
I use docker compose and prestashop PHP-FPM image, however we need a HTTP server.
But the default image httpd (apache), uses as default path : /usr/local/apache2/htdocs
Prestashop image is configured by default to : /var/www/html
Is it possible to modify this ?
I looked in the environment variables but I didn't find anything.
Here is my problem :
services:
apache:
image: httpd:2.4
restart: always
ports:
- 8080:80
volumes:
- ./:/usr/local/apache2/htdocs # volume not shared <------
- php-socket:/run/php
networks:
- front
...
here mariadb ...
...
php-fpm:
image: prestashop/prestashop:1.7.8.6-7.4-fpm
restart: always
ports:
- 9000:9000
volumes:
- ./:/var/www/html # volume not shared <------
- ./.docker/zz-docker.conf:/usr/local/etc/php-fpm.d/zz-docker.conf
- php-socket:/run/php
networks:
- front
volumes:
php-socket:
networks:
front:
But as there are two different paths, the volumes are not sharing and will return an error : File not found.
Do I have to modify the default HTTPD image Apache DocumentRoot (and create/var/www/html to copy files) ? Or is there another solution ?