Skip to content
This repository has been archived by the owner on Mar 24, 2022. It is now read-only.

using with apache #32

Open
hcliff opened this issue Apr 17, 2019 · 5 comments
Open

using with apache #32

hcliff opened this issue Apr 17, 2019 · 5 comments

Comments

@hcliff
Copy link

hcliff commented Apr 17, 2019

Hey, thanks for the project, super helpful.

I've been trying to deploy with apache, and I'm having some issues.

if my dockerfile reads identically to the getting started, everything works

FROM phpearth/php:7.2-nginx

but if I use the apache image instead

FROM phpearth/php:7.2-apache

I get stuck with "it works" at localhost instead of my files. Could you point me to some docs? thanks!

@hcliff hcliff closed this as completed Apr 17, 2019
@hcliff hcliff reopened this Apr 17, 2019
@antwal
Copy link

antwal commented Apr 23, 2019

same problem

@adaliszk
Copy link

adaliszk commented May 1, 2019

Have you guys put a different index.php file into the /var/www/html location?

@petk
Copy link
Member

petk commented May 1, 2019

Have you guys put a different index.php file into the /var/www/html location?

No. It should be the default index.html file from Alpine and Apache.

To use Apache image, you need to mount volume with you app into it and adjust Apache settings (/etc/apache2/...).

Best probably to do so by building and extended image:

FROM phpearth/php:7.3-apache

RUN ...

COPY . /

docker run -it --rm -p 80:80 -v pwd:/var/www/app phpearth/php:7.3-apache

@adaliszk
Copy link

adaliszk commented May 2, 2019

True, I would do the custom Dockerfile with custom configs with a serious project, but if you just want to check it out, you can just put your app into the default location.

With a more serious project I would even split the server and the FPM to run them as main processes instead of the runit.

@petk
Copy link
Member

petk commented May 4, 2019

Example how to use Apache image: https://github.com/petk/bugs.php.net basically yes you need an orchestration tool here to properly link running containers together. This example here uses Docker Swarm for example. Otherwise you can also simply use docker-compose tool...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants