Conversation
portal-files/Dockerfile
Outdated
| RUN rm /etc/apache2/sites-enabled/000-default.conf | ||
| COPY portal-files/apache2/vhost.conf /etc/apache2/sites-enabled/000-default.conf | ||
| COPY portal-files/apache2/portal.conf /etc/apache2/ | ||
| COPY portal-files/apache2/portal.conf /etc/apache2/sites-enabled/ |
There was a problem hiding this comment.
Hey, dieses File ist nur zum Inkludieren gedacht und darf nicht in sites-enabled rein. Gibt es ein Problem damit?
There was a problem hiding this comment.
I see.
For me (MacOS, Docker for Mac Community Edition (18.06.1-ce-mac73)) the current setup does not work.
When trying to start the portal container I see this in the logs:
apache2: Syntax error on line 225 of /etc/apache2/apache2.conf: Syntax error on line 4 of /etc/apache2/sites-enabled/000-default.conf: Could not open configuration file /etc/apache2/portal.conf: No such file or directory
I think there is something off:
-
we mount portal.conf into sites-enabled
https://github.com/gentics/portal-php-reference/blob/newproject/docker-compose.yml#L11 -
in the Dockerfile this copy command seems not to work on my machine:
https://github.com/gentics/portal-php-reference/blob/newproject/portal-files/Dockerfile#L50
changing it like this works:
COPY portal-files/apache2/portal.conf /etc/apache2/portal.conf
There was a problem hiding this comment.
I think you didn't execute docker-compose build after pulling the latest changes from GIT. When a change is made in the Dockerfile, this has to be done manually. However I just found out that the mount ./portal-files/apache2/portal.conf:/etc/apache2/sites-enabled/portal.conf in docker-compose.yml is wrong, the /sites-enabled has to be removed. However that's meant for development only.
There was a problem hiding this comment.
I can make the change in the f-setupfixes branch if you want.
There was a problem hiding this comment.
I did a clean install an ran into this issue.
I now changed the docker-compose.yml as suggested by you.
This works for me.
I still think https://github.com/gentics/portal-php-reference/blob/newproject/portal-files/Dockerfile#L50 does not have any effect.
There was a problem hiding this comment.
Thanks!
I can verify that the COPY statement works on my machine at least:
docker run --rm -ti --entrypoint= gentics-portal-php bash # Run container without any additional mounts
ls -l /etc/apache2/ | grep portal.conf
# Output:
# root@31d3f4c80241:/etc/apache2# ls -l /etc/apache2/ | grep portal.conf
# -rw-rw-r-- 1 root root 367 Oct 25 14:44 portal.conf
No description provided.