error 403
This commit is contained in:
parent
6c58ad9cf3
commit
318680cfcf
@ -3,37 +3,38 @@ version: '3.3'
|
||||
services:
|
||||
|
||||
nginx:
|
||||
#build: ./requirements/nginx
|
||||
image: nginx:stable-alpine
|
||||
build: ./requirements/nginx
|
||||
#image: nginx:stable-alpine
|
||||
#container_name: nginx
|
||||
#depends_on:
|
||||
# - wordpress
|
||||
# - mariadb
|
||||
depends_on:
|
||||
- php
|
||||
- mysql
|
||||
ports:
|
||||
- 80:80
|
||||
# - 443:443
|
||||
- 443:443
|
||||
volumes:
|
||||
#- wpfiles:/var/www/html
|
||||
- ./wordpress:/var/www/html
|
||||
- ./requirements/nginx/conf/nginx.conf:/etc/nginx/conf.d/default.conf
|
||||
#networks:
|
||||
# - wpnetwork
|
||||
#restart: always
|
||||
- ./wordpress:/var/www/html3
|
||||
- ./wordpress:/var/www/html2
|
||||
#- ./requirements/nginx/conf/nginx.conf:/etc/nginx/conf.d/default.conf
|
||||
networks:
|
||||
- wpnetwork
|
||||
restart: always
|
||||
|
||||
wordpress:
|
||||
php:
|
||||
#build: ./requirements/wordpress
|
||||
image: php:7.4-fpm-alpine
|
||||
container_name: wordpress
|
||||
volumes:
|
||||
# - wpfiles:/var/www/html
|
||||
- ./wordpress:/var/www/html
|
||||
depends_on:
|
||||
- php
|
||||
#networks:
|
||||
# - wpnetwork
|
||||
- mysql
|
||||
networks:
|
||||
- wpnetwork
|
||||
#restart: always
|
||||
|
||||
php:
|
||||
mysql:
|
||||
#build: ./requirements/mariadb
|
||||
image: mysql:latest
|
||||
#container_name: mariadb
|
||||
@ -51,12 +52,13 @@ services:
|
||||
#- ./requirements/mariadb:/var/lib/mysql
|
||||
#- wpfiles:/var/www/html
|
||||
- ./wordpress:/var/www/html
|
||||
#networks:
|
||||
# - wpnetwork
|
||||
networks:
|
||||
- wpnetwork
|
||||
#restart: always
|
||||
|
||||
#networks:
|
||||
# wpnetwork:
|
||||
networks:
|
||||
wpnetwork:
|
||||
driver: bridge
|
||||
|
||||
#volumes:
|
||||
# wpfiles:
|
||||
@ -12,7 +12,21 @@
|
||||
|
||||
FROM debian:buster
|
||||
|
||||
RUN apt-get update
|
||||
RUN apt-get install -y nginx
|
||||
RUN service nginx restart
|
||||
RUN ls /var/www/html
|
||||
RUN su
|
||||
RUN apt update && apt upgrade -y
|
||||
RUN apt install nginx sudo -y
|
||||
#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 {
|
||||
listen 80;
|
||||
server_name wordpress-docker.test;
|
||||
|
||||
root /var/www/html;
|
||||
root /var/www/html2;
|
||||
|
||||
index index.php;
|
||||
|
||||
location / {
|
||||
autoindex on;
|
||||
autoindex_exact_size on;
|
||||
try_files $uri $uri/ /index.php?$args;
|
||||
}
|
||||
|
||||
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;
|
||||
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