Closed leu2tm closed 3 years ago
@leu2tm , thanks for your contribution.
Could you please provide some context for this PR?
@andrea-perego Of course!
This PR is made for an easy way to start this "app" without the knowledge of PHP requirements, plugins etc.
Also since then there have been some changes to the 3rd party dependency easyrdf
, so refactoring has been made to make it function again.
Also the version of the dependency has been fixed in the composer.json
instead of latest/master, so there won't be any future breaking changes.
And at last, the docker version uses one of the latest versions of PHP to run the "app".
/ leu2tm
Thanks, @leu2tm . It would also be interesting to know if this Docker installation has been deployed somewhere, and for which use case.
About upgrading to more recent versions of EasyRDF, this is also being addressed in a separate branch (along with other things):
https://github.com/SEMICeu/iso-19139-to-dcat-ap/tree/upgrade-api-script
Coming to your PR, I see some issues with the following changes:
api/Dockerfile
:
+ RUN sed -ri -e 's!/var/www/html!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/sites-available/*.conf
+ RUN sed -ri -e 's!/var/www/!${APACHE_DOCUMENT_ROOT}!g' /etc/apache2/apache2.conf /etc/apache2/conf-available/*.conf
Are these two sed
commands making changes to the Apache config files of the hosting machine? If this is the case, it would be safer to install Apache inside the Docker container, and change the configuration there. Otherwise, access to other possibly hosted services, available from the original Apache DOCUMENT_ROOT
, may be broken.
api/index.php
:
- require('./lib/composer/vendor/autoload.php');
+ require('/vendor/autoload.php');
I have not tested it, but the change of path may not work with the current PHP basic installation. It would be better to edit the copy of the index.php
file in the Docker container, and not the original one.
@andrea-perego I would say this is just a guided way for setting it up for a local development environment.
Also the image is currently running on a php image with apache installed, so no worries.
FROM php:7.4-apache
EDIT:
It should be working now without interferring with the previous setup.
Thanks, @leu2tm .
I'm going to merge this PR.
Thanks again for this contribution.
Dockerfile
.docker-compose.yml
.README.md
with installation guide with docker.index.php
.