Skip to content

Conversation

@bernhardriegler
Copy link
Contributor

No description provided.

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/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, dieses File ist nur zum Inkludieren gedacht und darf nicht in sites-enabled rein. Gibt es ein Problem damit?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

  1. we mount portal.conf into sites-enabled
    https://github.com/gentics/portal-php-reference/blob/newproject/docker-compose.yml#L11

  2. 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

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can make the change in the f-setupfixes branch if you want.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants