error 403
This commit is contained in:
parent
6c58ad9cf3
commit
318680cfcf
@ -3,37 +3,38 @@ version: '3.3'
|
|||||||
services:
|
services:
|
||||||
|
|
||||||
nginx:
|
nginx:
|
||||||
#build: ./requirements/nginx
|
build: ./requirements/nginx
|
||||||
image: nginx:stable-alpine
|
#image: nginx:stable-alpine
|
||||||
#container_name: nginx
|
#container_name: nginx
|
||||||
#depends_on:
|
depends_on:
|
||||||
# - wordpress
|
- php
|
||||||
# - mariadb
|
- mysql
|
||||||
ports:
|
ports:
|
||||||
- 80:80
|
- 80:80
|
||||||
# - 443:443
|
- 443:443
|
||||||
volumes:
|
volumes:
|
||||||
#- wpfiles:/var/www/html
|
#- wpfiles:/var/www/html
|
||||||
- ./wordpress:/var/www/html
|
- ./wordpress:/var/www/html
|
||||||
- ./requirements/nginx/conf/nginx.conf:/etc/nginx/conf.d/default.conf
|
- ./wordpress:/var/www/html3
|
||||||
#networks:
|
- ./wordpress:/var/www/html2
|
||||||
# - wpnetwork
|
#- ./requirements/nginx/conf/nginx.conf:/etc/nginx/conf.d/default.conf
|
||||||
#restart: always
|
networks:
|
||||||
|
- wpnetwork
|
||||||
|
restart: always
|
||||||
|
|
||||||
wordpress:
|
php:
|
||||||
#build: ./requirements/wordpress
|
#build: ./requirements/wordpress
|
||||||
image: php:7.4-fpm-alpine
|
image: php:7.4-fpm-alpine
|
||||||
container_name: wordpress
|
|
||||||
volumes:
|
volumes:
|
||||||
# - wpfiles:/var/www/html
|
# - wpfiles:/var/www/html
|
||||||
- ./wordpress:/var/www/html
|
- ./wordpress:/var/www/html
|
||||||
depends_on:
|
depends_on:
|
||||||
- php
|
- mysql
|
||||||
#networks:
|
networks:
|
||||||
# - wpnetwork
|
- wpnetwork
|
||||||
#restart: always
|
#restart: always
|
||||||
|
|
||||||
php:
|
mysql:
|
||||||
#build: ./requirements/mariadb
|
#build: ./requirements/mariadb
|
||||||
image: mysql:latest
|
image: mysql:latest
|
||||||
#container_name: mariadb
|
#container_name: mariadb
|
||||||
@ -51,12 +52,13 @@ services:
|
|||||||
#- ./requirements/mariadb:/var/lib/mysql
|
#- ./requirements/mariadb:/var/lib/mysql
|
||||||
#- wpfiles:/var/www/html
|
#- wpfiles:/var/www/html
|
||||||
- ./wordpress:/var/www/html
|
- ./wordpress:/var/www/html
|
||||||
#networks:
|
networks:
|
||||||
# - wpnetwork
|
- wpnetwork
|
||||||
#restart: always
|
#restart: always
|
||||||
|
|
||||||
#networks:
|
networks:
|
||||||
# wpnetwork:
|
wpnetwork:
|
||||||
|
driver: bridge
|
||||||
|
|
||||||
#volumes:
|
#volumes:
|
||||||
# wpfiles:
|
# wpfiles:
|
||||||
@ -12,7 +12,21 @@
|
|||||||
|
|
||||||
FROM debian:buster
|
FROM debian:buster
|
||||||
|
|
||||||
RUN apt-get update
|
RUN su
|
||||||
RUN apt-get install -y nginx
|
RUN apt update && apt upgrade -y
|
||||||
RUN service nginx restart
|
RUN apt install nginx sudo -y
|
||||||
RUN ls /var/www/html
|
#COPY /home/apommier/42/inception/srcs/wordpresse/ var/www/html
|
||||||
|
|
||||||
|
RUN ls var/www/
|
||||||
|
#CMD ["echo","-----------new-----------"]
|
||||||
|
#CMD ["ls","var/www/"]
|
||||||
|
#CMD ["echo","-----------new-----------"]
|
||||||
|
#CMD ["ls","var/www/html"]
|
||||||
|
#CMD ["echo","-----------new-----------"]
|
||||||
|
#CMD ["ls","var/www/html2"]
|
||||||
|
#CMD ["echo","-----------new-----------"]
|
||||||
|
#CMD ["ls","var/www/html3"]
|
||||||
|
ENTRYPOINT ["nginx","-g","daemon off;"]
|
||||||
|
#RUN cd var/www/html && ls && cat index.php
|
||||||
|
#RUN ls var/www/
|
||||||
|
#RUN sudo service nginx restart
|
||||||
@ -1,23 +1,29 @@
|
|||||||
upstream php {
|
|
||||||
server unix:/tmp/php-cgi.socket;
|
|
||||||
server php:3030;
|
|
||||||
}
|
|
||||||
|
|
||||||
server {
|
server {
|
||||||
listen 80;
|
listen 80;
|
||||||
server_name wordpress-docker.test;
|
server_name wordpress-docker.test;
|
||||||
|
|
||||||
root /var/www/html;
|
root /var/www/html2;
|
||||||
|
|
||||||
index index.php;
|
index index.php;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
|
autoindex on;
|
||||||
|
autoindex_exact_size on;
|
||||||
try_files $uri $uri/ /index.php?$args;
|
try_files $uri $uri/ /index.php?$args;
|
||||||
}
|
}
|
||||||
|
|
||||||
location ~ \.php$ {
|
location ~ \.php$ {
|
||||||
|
set $upstream php:9000;
|
||||||
|
|
||||||
|
# nginx will now start if host is not reachable
|
||||||
|
fastcgi_pass $upstream;
|
||||||
|
fastcgi_index index.php;
|
||||||
|
|
||||||
|
|
||||||
include fastcgi.conf;
|
include fastcgi.conf;
|
||||||
fastcgi_intercept_errors on;
|
fastcgi_intercept_errors on;
|
||||||
fastcgi_pass php;
|
#fastcgi_pass php:9000;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
0
srcs/wordpress/index.php
Normal file → Executable file
0
srcs/wordpress/index.php
Normal file → Executable file
Loading…
Reference in New Issue
Block a user