nginx, php in docker
This commit is contained in:
1
homepage/cwsvJudo/participo/app/public/index.html
Normal file
1
homepage/cwsvJudo/participo/app/public/index.html
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<h1>Hello, World!</h1>
|
||||||
2
homepage/cwsvJudo/participo/app/public/index.php
Normal file
2
homepage/cwsvJudo/participo/app/public/index.php
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
<?
|
||||||
|
phpinfo();
|
||||||
19
homepage/cwsvJudo/participo/docker-compose.yml
Normal file
19
homepage/cwsvJudo/participo/docker-compose.yml
Normal file
@@ -0,0 +1,19 @@
|
|||||||
|
# version for the docker compose file to use
|
||||||
|
version: "3"
|
||||||
|
# a dict of services running in the container label: {<service>} label is a self defined name for the service
|
||||||
|
services:
|
||||||
|
# the web service
|
||||||
|
web:
|
||||||
|
image: nginx:latest
|
||||||
|
# port forwarding
|
||||||
|
ports:
|
||||||
|
# forward port 80 top port 80 in the container
|
||||||
|
- "80:80"
|
||||||
|
# files and directories to be available in the container
|
||||||
|
volumes:
|
||||||
|
- ./nginx.conf:/etc/nginx/conf.d/nginx.conf
|
||||||
|
- ./app:/app
|
||||||
|
php:
|
||||||
|
image: php:fpm
|
||||||
|
volumes:
|
||||||
|
- ./app:/app
|
||||||
12
homepage/cwsvJudo/participo/nginx.conf
Normal file
12
homepage/cwsvJudo/participo/nginx.conf
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
server {
|
||||||
|
listen 80 default_server;
|
||||||
|
root /app/public;
|
||||||
|
|
||||||
|
index index.php index.html index.htm;
|
||||||
|
|
||||||
|
location ~ \.php$ {
|
||||||
|
fastcgi_pass php:9000;
|
||||||
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||||
|
include fastcgi_params;
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user