Push
This commit is contained in:
parent
2174bd9366
commit
56d75bb43c
10
.env
Normal file
10
.env
Normal file
|
@ -0,0 +1,10 @@
|
|||
#MARIADB SETUP
|
||||
MYSQL_ROOT_PASSWORD=totoflute
|
||||
MYSQL_USER=bozo
|
||||
MYSQL_PASSWORD=rotule
|
||||
|
||||
#WORDPRESS SETUP
|
||||
WP_ADMIN=bozo
|
||||
WP_ADMIN_PASSWORD=totoflute
|
||||
WP_USER=camille
|
||||
WP_USER_PASSWORD=chauvet
|
9
Makefile
9
Makefile
|
@ -0,0 +1,9 @@
|
|||
up:
|
||||
mkdir -p /home/erey-bet/data/wordpress-files/
|
||||
mkdir -p /home/erey-bet/data/wordpress-db/
|
||||
docker-compose up --build -d
|
||||
|
||||
del:
|
||||
docker-compose down
|
||||
sudo rm -rf /home/erey-bet/data/wordpress-files/
|
||||
sudo rm -rf /home/erey-bet/data/wordpress-db/
|
|
@ -24,6 +24,8 @@ services:
|
|||
restart: always
|
||||
volumes:
|
||||
- wordpress-files:/var/www/wordpress/
|
||||
depends_on:
|
||||
- mariadb
|
||||
|
||||
mariadb:
|
||||
image: mariadb
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
FROM alpine:3.17
|
||||
|
||||
RUN apk -U upgrade && apk add nginx openssl
|
||||
RUN openssl req -x509 -newkey rsa:2048 -days 365 -nodes \
|
||||
RUN openssl req -x509 -newkey rsa:4096 -days 365 -nodes \
|
||||
-keyout /etc/ssl/private/erey-bet.42.fr_key.pem \
|
||||
-out /etc/ssl/certs/erey-bet.42.fr_cert.pem -sha256 \
|
||||
-subj "/C=FR/ST=Nouvelle Aquitaine/L=Angouleme/ \
|
||||
|
|
|
@ -17,7 +17,7 @@ server {
|
|||
|
||||
ssl_certificate /etc/ssl/certs/erey-bet.42.fr_cert.pem;
|
||||
ssl_certificate_key /etc/ssl/private/erey-bet.42.fr_key.pem;
|
||||
ssl_protocols TLSv1.2;
|
||||
ssl_protocols TLSv1.3;
|
||||
|
||||
location / {
|
||||
# This is cool because no php is touched for static content.
|
||||
|
|
|
@ -3,14 +3,19 @@ FROM alpine:3.17
|
|||
RUN apk -U upgrade
|
||||
RUN apk add sudo coreutils php php-phar php-fpm php-mysqli php-iconv mysql-client \
|
||||
php-json php-curl php-dom php-exif php-fileinfo php-mbstring php-openssl php-xml php-zip \
|
||||
php-tokenizer php-session
|
||||
php-tokenizer php-session curl
|
||||
|
||||
RUN mkdir -p /var/www/
|
||||
WORKDIR /var/www/
|
||||
RUN wget https://wordpress.org/latest.tar.gz
|
||||
RUN tar -xzvf latest.tar.gz
|
||||
RUN rm latest.tar.gz
|
||||
WORKDIR /var/www/wordpress/
|
||||
|
||||
RUN wget https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar \
|
||||
&& chmod +x wp-cli.phar && mv wp-cli.phar /bin/wp
|
||||
|
||||
COPY php.conf /etc/php81/php-fpm.d/www.conf
|
||||
COPY bash.sh /etc/
|
||||
|
||||
ENTRYPOINT ["php-fpm81", "-F"]
|
||||
ENTRYPOINT ["sh", "/etc/bash.sh"]
|
||||
|
|
11
services/wordpress/bash.sh
Normal file
11
services/wordpress/bash.sh
Normal file
|
@ -0,0 +1,11 @@
|
|||
wp config create --dbname=wordpress --dbuser="Bozo" \
|
||||
--dbpass="BozoPassword" --dbhost=mariadb --force
|
||||
|
||||
wp core is-installed || wp core install --url=erey-bet.42.fr --title="BozoLand" --admin_user="erey-bet" \
|
||||
--admin_password="totoflute" --admin_email="erey-bet"@mail.org --skip-email
|
||||
|
||||
wp user create "kdx2a" "kdx2a"@mail.org --user_pass="kdx2a"
|
||||
|
||||
wp theme install twentytwentytwo --activate
|
||||
|
||||
exec php-fpm81 -F
|
Loading…
Reference in a new issue