little step
This commit is contained in:
parent
fede89c2b3
commit
78e62076a1
@ -0,0 +1,46 @@
|
||||
version: '3.9'
|
||||
|
||||
service:
|
||||
|
||||
nginx:
|
||||
build: ./requirements/nginx
|
||||
container_name: nginx
|
||||
depends_on:
|
||||
- wordpress
|
||||
- mariadb
|
||||
ports:
|
||||
- 80:80
|
||||
- 443:443
|
||||
volumes:
|
||||
- wpfiles:/var/www/html
|
||||
- ./nginx/conf/nginx.conf:etc/nginx/conf.d/default.conf
|
||||
networks:
|
||||
- wpnetwork
|
||||
restart: always
|
||||
|
||||
wordpress:
|
||||
build: ./requirements/wordpress
|
||||
container_name: wordpress
|
||||
volumes:
|
||||
- wpfiles:/var/www/html
|
||||
depends_on:
|
||||
- mariadb
|
||||
networks:
|
||||
- wpnetwork
|
||||
restart: always
|
||||
|
||||
mariadb:
|
||||
build: ./requirements/mariadb
|
||||
container_name: mariadb
|
||||
# volumes :
|
||||
# - wpfiles:/var/www/html
|
||||
environment:
|
||||
networks:
|
||||
- wpnetwork
|
||||
restart: always
|
||||
|
||||
networks:
|
||||
wpnetwork:
|
||||
|
||||
volumes:
|
||||
wpfiles:
|
||||
@ -0,0 +1,16 @@
|
||||
# **************************************************************************** #
|
||||
# #
|
||||
# ::: :::::::: #
|
||||
# Dockerfile :+: :+: :+: #
|
||||
# +:+ +:+ +:+ #
|
||||
# By: apommier <apommier@student.42.fr> +#+ +:+ +#+ #
|
||||
# +#+#+#+#+#+ +#+ #
|
||||
# Created: 2022/08/19 19:54:25 by apommier #+# #+# #
|
||||
# Updated: 2022/08/24 03:56:01 by apommier ### ########.fr #
|
||||
# #
|
||||
# **************************************************************************** #
|
||||
|
||||
FROM debian:buster
|
||||
|
||||
RUN apt-get update \
|
||||
apt install mariadb-server
|
||||
@ -0,0 +1,16 @@
|
||||
# **************************************************************************** #
|
||||
# #
|
||||
# ::: :::::::: #
|
||||
# Dockerfile :+: :+: :+: #
|
||||
# +:+ +:+ +:+ #
|
||||
# By: apommier <apommier@student.42.fr> +#+ +:+ +#+ #
|
||||
# +#+#+#+#+#+ +#+ #
|
||||
# Created: 2022/08/19 19:54:25 by apommier #+# #+# #
|
||||
# Updated: 2022/08/19 19:54:45 by apommier ### ########.fr #
|
||||
# #
|
||||
# **************************************************************************** #
|
||||
|
||||
FROM debian:buster
|
||||
|
||||
RUN apt-get update
|
||||
RUN apt-get install nginx
|
||||
21
srcs/requirements/nginx/conf/nginx.conf
Normal file
21
srcs/requirements/nginx/conf/nginx.conf
Normal file
@ -0,0 +1,21 @@
|
||||
upstream php {
|
||||
server unix:/tmp/php-cgi.socket;
|
||||
server php:9000;
|
||||
}
|
||||
|
||||
server {
|
||||
listen 80;
|
||||
server_name apommier.42.fr;
|
||||
|
||||
root /var/www/html;
|
||||
|
||||
location / {
|
||||
try_files $uri/ /index.php?$args;
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
include fastcgi.conf;
|
||||
fastcgi_intercept_errors on;
|
||||
fastcgi_pass php;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,30 @@
|
||||
# **************************************************************************** #
|
||||
# #
|
||||
# ::: :::::::: #
|
||||
# Dockerfile :+: :+: :+: #
|
||||
# +:+ +:+ +:+ #
|
||||
# By: apommier <apommier@student.42.fr> +#+ +:+ +#+ #
|
||||
# +#+#+#+#+#+ +#+ #
|
||||
# Created: 2022/08/19 19:54:25 by apommier #+# #+# #
|
||||
# Updated: 2022/08/24 04:10:35 by apommier ### ########.fr #
|
||||
# #
|
||||
# **************************************************************************** #
|
||||
|
||||
FROM debian:buster
|
||||
|
||||
RUN apt-get update \
|
||||
apt install php-fpm \
|
||||
apt install wget \
|
||||
apt install tar \
|
||||
wget https://wordpress.org/latest.tar.gz \
|
||||
tar -xzvf latest.tar.gz \
|
||||
mv wordpress /var/www/html
|
||||
|
||||
RUN apt install php-mysql \
|
||||
apt install php-gd \
|
||||
apt install mysqli
|
||||
|
||||
RUN service php restart
|
||||
|
||||
|
||||
#RUN docker-php-ext-install mysqli pdo pdo_mysql && docker-php-ext-enable pdo_mysql
|
||||
Loading…
Reference in New Issue
Block a user