This commit is contained in:
Danny Houtworm 2023-08-14 08:41:31 +00:00
parent f3ea19f7c3
commit 72b12d749d
11 changed files with 13 additions and 111 deletions

View File

@ -2,7 +2,8 @@ all: up
build:
sudo docker network create --subnet=172.20.30.0/24 wordpress
sudo mkdir -p ./build /home/djonker/data/adminer /home/djonker/data/wordpress
sudo mkdir -p ./build /home/djonker/data/adminer /home/djonker/data/wordpress /home/djonker/data/nginx
sudo touch /home/djonker/data/nginx/access.log
sudo cp srcs/requirements/wordpress/srcs/wordpress.conf /home/djonker/data/wordpress/wp-config.php.temp
sudo curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
sudo mv wp-cli.phar /home/djonker/data/wordpress/wp-cli.phar
@ -13,6 +14,7 @@ build:
up: build
sudo docker-compose -f ./srcs/docker-compose.yml up -d
sudo systemctl restart fail2ban
down:
sudo docker-compose -f ./srcs/docker-compose.yml down

View File

@ -10,6 +10,7 @@ services:
- /home/djonker/data/wordpress:/var/www/wordpress
- /home/djonker/data/nextcloud:/var/www/nextcloud
- /home/djonker/data/adminer:/var/www/adminer
- /home/djonker/data/nginx:/var/log/nginx
ports:
- 80:80
- 443:443

View File

@ -1,4 +1,4 @@
FROM alpine
FROM alpine:3.18.3
RUN sleep 10
RUN apk update
RUN apk add php

View File

@ -1,4 +1,4 @@
FROM alpine
FROM alpine:3.18.3
RUN sleep 10
RUN apk update
RUN apk add openssl

View File

@ -1,7 +1,4 @@
FROM alpine
ARG WORDPRESSDATABASE=${WORDPRESSDATABASE}
ARG WORDPRESSDATABASEUSER=${WORDPRESSDATABASEUSER}
ARG WORDPRESSDATABASEPASSWD=${WORDPRESSDATABASEPASSWD}
FROM alpine:3.18.3
RUN sleep 10
RUN apk update
RUN apk add mariadb

View File

@ -1,4 +1,4 @@
FROM alpine
FROM alpine:3.18.3
RUN sleep 10
RUN apk update
RUN apk add sudo

View File

@ -1,95 +0,0 @@
<?php
/**
* The base configuration for WordPress
*
* The wp-config.php creation script uses this file during the
* installation. You don't have to use the web site, you can
* copy this file to "wp-config.php" and fill in the values.
*
* This file contains the following configurations:
*
* * MySQL settings
* * Secret keys
* * Database table prefix
* * ABSPATH
*
* @link https://wordpress.org/support/article/editing-wp-config-php/
*
* @package WordPress
*/
// ** MySQL settings - You can get this info from your web host ** //
/** The name of the database for WordPress */
/** MySQL database username */
/** MySQL database password */
/** MySQL hostname */
define( 'DB_HOST', '172.20.30.20' );
/** Database Charset to use in creating database tables. */
define( 'DB_CHARSET', 'utf8mb4' );
/** The Database Collate type. Don't change this if in doubt. */
define( 'DB_COLLATE', '' );
define('WP_SITEURL', 'https://djonker.42.fr');
define('WP_HOME', 'https://djonker.42.fr');
/**#@+
* Authentication Unique Keys and Salts.
*
* Change these to different unique phrases!
* You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/salt/ WordPress.org secret-key service}
* You can change these at any point in time to invalidate all existing cookies. This will force all users to have to log in again.
*
* @since 2.6.0
*/
define( 'AUTH_KEY', 's`&T$qD81;7*0*cQQ[(,kaUO9dJZsg+>[MB(,6o8c}ixu]o4<7:IfFm47YlZ}H.g' );
define( 'SECURE_AUTH_KEY', 'VP]zWxYl9qI7UN&2Tpxfi19GVKVnL K{E<{eQk@%yGVAenVYI9=fMdW<u8F?|hM@' );
define( 'LOGGED_IN_KEY', 'fmx,d+CobrGgu8YKClAupcXZPr#~a#>wQ8H#^=T}lYc-[<;_{GB>O1J<0hRB aS8' );
define( 'NONCE_KEY', '~mc~SvOjEtecCl`LGO*gBSc+LSF(uJIn[*CYs>X?9_pLAI 2-I5L_MK@rsjGpi~l' );
define( 'AUTH_SALT', 'W{pgvAJTq@!kWR2_e2K(,1QDh^t{(2nO@.n!M>bqpFI0J0kz[=)&K_X)qk|64H`m' );
define( 'SECURE_AUTH_SALT', 'jjnbWeXgfySz<d!#/9Hi;CrB`FJy76&=u+N#HyOy+.At nPS492p8PH{z(b?.lU^' );
define( 'LOGGED_IN_SALT', '~@ClPol9m9<,Mv.,&cA!a`iR{kxq29bhLdH?/(yV+)2^9[,I-1yC?=VfXB#BPB[o' );
define( 'NONCE_SALT', '@T?7wO4&YykHFhpw#^c4>Hg&yal@!YSRcZr@G3</ztzN2v5__%RQ@;fN3_b)w0*`' );
/**#@-*/
/**
* WordPress Database Table prefix.
*
* You can have multiple installations in one database if you give each
* a unique prefix. Only numbers, letters, and underscores please!
*/
$table_prefix = 'wp_';
/**
* For developers: WordPress debugging mode.
*
* Change this to true to enable the display of notices during development.
* It is strongly recommended that plugin and theme developers use WP_DEBUG
* in their development environments.
*
* For information on other constants that can be used for debugging,
* visit the documentation.
*
* @link https://wordpress.org/support/article/debugging-in-wordpress/
*/
define( 'WP_DEBUG', false );
define( 'WP_REDIS_HOST', '172.20.30.50' );
define( 'WP_REDIS_PORT', 6379 );
define( 'WP_REDIS_TIMEOUT', 1 );
define( 'WP_REDIS_READ_TIMEOUT', 1 );
define( 'WP_REDIS_DATABASE', 0 );
/* That's all, stop editing! Happy publishing. */
/** Absolute path to the WordPress directory. */
if ( ! defined( 'ABSPATH' ) ) {
define( 'ABSPATH', __DIR__ . '/' );
}
/** Sets up WordPress vars and included files. */
require_once ABSPATH . 'wp-settings.php';

View File

@ -1,7 +1,7 @@
#!/bin/sh
if cat /usr/share/webapps/nextcloud/index.php
if cat /var/www/nextcloud/config/config.php
then
touch /usr/share/webapps/nextcloud/index.php
touch /var/www/nextcloud/config/config.php
else
sleep 15
cd /var/www/nextcloud

View File

@ -1,15 +1,12 @@
FROM alpine
FROM alpine:3.18.3
RUN sleep 10
RUN apk update
RUN apk add openssl
RUN apk add nginx
#COPY srcs/start.sh /root/start.sh
COPY srcs/nginx.conf /etc/nginx/nginx.conf
COPY srcs/index.html /var/www/html/index.html
COPY srcs/style.css /var/www/html/style.css
WORKDIR /root/
#RUN adduser --disabled-password admin
#RUN echo "admin:password" | chpasswd
RUN openssl genrsa -out nginx.key
RUN openssl req -new -key nginx.key -out nginx.csr -subj "/C=NL/ST=Friesland/L=Heerenveen/O=localhost/OU=localhost/CN=localhost/emailAddress=djonker@student.codam.nl"
RUN openssl x509 -req -days 365 -in nginx.csr -signkey nginx.key -out nginx.crt

View File

@ -1,4 +1,4 @@
FROM alpine
FROM alpine:3.18.3
RUN sleep 10
RUN apk update
RUN apk add redis

View File

@ -1,4 +1,4 @@
FROM alpine
FROM alpine:3.18.3
RUN sleep 10
RUN apk update
RUN apk add openssl