This commit is contained in:
Danny Houtworm 2023-06-25 03:25:42 +00:00
parent a10d1f656d
commit 5857f94a43
20 changed files with 0 additions and 2463 deletions

0
srcs/.env Normal file
View File

View File

@ -1,15 +0,0 @@
FROM alpine
RUN sleep 10
RUN apk update
RUN apk add openssl
RUN apk add pure-ftpd --repository http://dl-3.alpinelinux.org/alpine/edge/testing/ --allow-untrusted
RUN apk add telegraf
COPY srcs/start.sh /root/start.sh
COPY srcs/vsftpd.conf /etc/vsftpd/vsftpd.conf
COPY srcs/telegraf.conf /etc/telegraf/telegraf.conf
WORKDIR /root/
RUN adduser --disabled-password admin
RUN echo "admin:password" | chpasswd
CMD sh start.sh
EXPOSE 21/tcp
EXPOSE 21000/tcp

View File

@ -1,3 +0,0 @@
#!/bin/sh
telegraf &
pure-ftpd -p 21000:21000

View File

@ -1,11 +0,0 @@
listen=YES
local_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
pam_service_name=vsftpd
seccomp_sandbox=NO
write_enable=YES
secure_chroot_dir=/var/empty
anonymous_enable=YES
anon_root=/srv/ftp
no_anon_password=YES

View File

@ -1,15 +0,0 @@
FROM alpine
RUN sleep 10
RUN apk update
RUN apk add mariadb
RUN apk add mariadb-client
RUN apk add telegraf
COPY srcs/start.sh /root/start.sh
COPY srcs/telegraf.conf /etc/telegraf/telegraf.conf
COPY srcs/my.cnf /etc/my.cnf.d/mariadb-server.cnf
COPY srcs/maria.sql /root/maria.sql
WORKDIR /root/
RUN mkdir -p /run/mysqld
RUN chown -R mysql:mysql /run/mysqld /var/lib/mysql
CMD sh start.sh
EXPOSE 3306/tcp

File diff suppressed because one or more lines are too long

View File

@ -1,49 +0,0 @@
#
# These groups are read by MariaDB server.
# Use it for options that only the server (but not clients) should see
# this is read by the standalone daemon and embedded servers
[server]
# this is only for the mysqld standalone daemon
[mysqld]
user = mysql
pid-file = /var/run/mysqld/mysqld.pid
socket = /var/run/mysqld/mysqld.sock
port = 3306
datadir = /var/lib/mysql
tmpdir = /tmp
bind-address = 0.0.0.0
skip-networking = false
# Galera-related settings
[galera]
# Mandatory settings
#wsrep_on=ON
#wsrep_provider=
#wsrep_cluster_address=
#binlog_format=row
#default_storage_engine=InnoDB
#innodb_autoinc_lock_mode=2
#
# Allow server to accept connections on all interfaces.
#
#bind-address=0.0.0.0
#
# Optional setting
#wsrep_slave_threads=1
#innodb_flush_log_at_trx_commit=0
# this is only for embedded server
[embedded]
# This group is only read by MariaDB servers, not by MySQL.
# If you use the same .cnf file for MySQL and MariaDB,
# you can put MariaDB-only options here
[mariadb]
# This group is only read by MariaDB-10.5 servers.
# If you use the same .cnf file for MariaDB of different versions,
# use this group for options that older servers don't understand
[mariadb-10.5]

View File

@ -1,13 +0,0 @@
#!/bin/sh
telegraf &
if cat /var/lib/mysql/initialized
then
touch /var/lib/mysql/initialized
else
mysql_install_db --user=mysql --datadir=/var/lib/mysql
mysqld & sleep 10
mysql < maria.sql
killall mysqld
touch /var/lib/mysql/initialized
fi
mysqld

View File

@ -1,25 +0,0 @@
FROM alpine
RUN sleep 10
RUN apk update
RUN apk add openssh
RUN apk add openssl
RUN apk add nginx
RUN apk add telegraf
COPY srcs/start.sh /root/start.sh
COPY srcs/nginx.conf /etc/nginx/nginx.conf
COPY srcs/index.html /var/www/index.html
COPY srcs/telegraf.conf /etc/telegraf/telegraf.conf
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
RUN mv nginx.crt /etc/ssl/certs/nginx.crt
RUN mv nginx.key /etc/ssl/private/nginx.key
RUN chmod 600 /etc/ssl/certs/nginx.crt /etc/ssl/private/nginx.key
RUN ssh-keygen -A
CMD sh start.sh
EXPOSE 80/tcp
EXPOSE 443/tcp
EXPOSE 22/tcp

View File

@ -1,19 +0,0 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title></title>
<meta name="description" content="">
<meta name="Houtworm" content="">
<link rel="stylesheet" href="css/style.css">
</head>
<body>
<script src="js/script.js"></script>
<h1>You seem to be a rigorous tester :)</h1>
</body>
</html>

View File

@ -1,50 +0,0 @@
user root;
worker_processes auto;
error_log /var/log/nginx/error.log;
error_log /var/log/nginx/error.log notice;
error_log /var/log/nginx/error.log info;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
access_log /var/log/nginx/access.log;
sendfile on;
keepalive_timeout 3600;
gzip on;
gzip_comp_level 6;
gzip_vary on;
gzip_types text/plain text/css application/json application/x-javascript application/javascript text/xml application/xml application/rss+xml text/javascript image/svg+xml application/vnd.ms-fontobject application/x-font-ttf font/opentype;
server {
listen 443 ssl default_server;
ssl_certificate /etc/ssl/certs/nginx.crt;
ssl_certificate_key /etc/ssl/private/nginx.key;
root /var/www;
index index.php index.html index.htm;
server_name localhost;
location / {
autoindex on;
try_files $uri $uri/ =404;
}
location = /wordpress {
return 307 https://$host:5050;
}
location /phpmyadmin/ {
proxy_pass https://$host:5000;
}
}
server {
listen 80;
return 301 https://$host$request_uri;
}
}

View File

@ -1,4 +0,0 @@
#!/bin/sh
/usr/sbin/sshd
telegraf &
nginx -g 'daemon off;'

View File

@ -1,35 +0,0 @@
FROM alpine
RUN sleep 10
RUN apk update
RUN apk add openssl
RUN apk add nginx
RUN apk add php7
RUN apk add php7-fpm
RUN apk add php7-mysqli
RUN apk add php7-gd
RUN apk add php7-mbstring
RUN apk add php7-curl
RUN apk add php7-json
RUN apk add php7-xml
RUN apk add php7-zip
RUN apk add php7-iconv
RUN apk add php7-session
RUN apk add telegraf
COPY srcs/start.sh /root/start.sh
COPY srcs/nginx.conf /etc/nginx/nginx.conf
COPY srcs/telegraf.conf /etc/telegraf/telegraf.conf
COPY srcs/phpmyadmin.conf /var/www/phpmyadmin/config.inc.php
WORKDIR /root/
RUN wget https://files.phpmyadmin.net/phpMyAdmin/5.1.1/phpMyAdmin-5.1.1-english.tar.gz
RUN tar -xvf phpMyAdmin-5.1.1-english.tar.gz
RUN mv phpMyAdmin-5.1.1-english/* /var/www/phpmyadmin/
RUN mkdir -p /var/www/phpmyadmin/tmp
RUN chown -R root:root /var/www
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
RUN mv nginx.crt /etc/ssl/certs/nginx.crt
RUN mv nginx.key /etc/ssl/private/nginx.key
RUN chmod 600 /etc/ssl/certs/nginx.crt /etc/ssl/private/nginx.key
CMD sh start.sh
EXPOSE 5000/tcp

View File

@ -1,48 +0,0 @@
user root;
worker_processes auto;
error_log /var/log/nginx/error.log;
error_log /var/log/nginx/error.log notice;
error_log /var/log/nginx/error.log info;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
access_log /var/log/nginx/access.log;
sendfile on;
keepalive_timeout 3600;
gzip on;
gzip_comp_level 6;
gzip_vary on;
gzip_types text/plain text/css application/json application/x-javascript application/javascript text/xml application/xml application/rss+xml text/javascript image/svg+xml application/vnd.ms-fontobject application/x-font-ttf font/opentype;
server {
listen 5000 ssl default_server;
ssl_certificate /etc/ssl/certs/nginx.crt;
ssl_certificate_key /etc/ssl/private/nginx.key;
root /var/www;
index index.php index.html index.htm;
server_name localhost;
location / {
autoindex on;
try_files $uri $uri/ =404;
}
location ~ \.php$ {
include fastcgi.conf;
include fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
}
if ($scheme = http) {
return 301 https://$server_name$request_uri;
}
}
}

View File

@ -1,153 +0,0 @@
<?php
/**
* phpMyAdmin sample configuration, you can use it as base for
* manual configuration. For easier setup you can use setup/
*
* All directives are explained in documentation in the doc/ folder
* or at <https://docs.phpmyadmin.net/>.
*/
declare(strict_types=1);
/**
* This is needed for cookie based authentication to encrypt password in
* cookie. Needs to be 32 chars long.
*/
$cfg['blowfish_secret'] = 'flsbdihjkuvydfsbkhjufdghiluiossd'; /* YOU MUST FILL IN THIS FOR COOKIE AUTH! */
/**
* Servers configuration
*/
$i = 0;
/**
* First server
*/
$i++;
/* Authentication type */
$cfg['Servers'][$i]['auth_type'] = 'cookie';
/* Server parameters */
$cfg['Servers'][$i]['host'] = 'mariadb';
$cfg['Servers'][$i]['compress'] = false;
$cfg['Servers'][$i]['AllowNoPassword'] = false;
/**
* phpMyAdmin configuration storage settings.
*/
/* User used to manipulate with storage */
// $cfg['Servers'][$i]['controlhost'] = '';
// $cfg['Servers'][$i]['controlport'] = '';
// $cfg['Servers'][$i]['controluser'] = 'pma';
// $cfg['Servers'][$i]['controlpass'] = 'pmapass';
/* Storage database and tables */
// $cfg['Servers'][$i]['pmadb'] = 'phpmyadmin';
// $cfg['Servers'][$i]['bookmarktable'] = 'pma__bookmark';
// $cfg['Servers'][$i]['relation'] = 'pma__relation';
// $cfg['Servers'][$i]['table_info'] = 'pma__table_info';
// $cfg['Servers'][$i]['table_coords'] = 'pma__table_coords';
// $cfg['Servers'][$i]['pdf_pages'] = 'pma__pdf_pages';
// $cfg['Servers'][$i]['column_info'] = 'pma__column_info';
// $cfg['Servers'][$i]['history'] = 'pma__history';
// $cfg['Servers'][$i]['table_uiprefs'] = 'pma__table_uiprefs';
// $cfg['Servers'][$i]['tracking'] = 'pma__tracking';
// $cfg['Servers'][$i]['userconfig'] = 'pma__userconfig';
// $cfg['Servers'][$i]['recent'] = 'pma__recent';
// $cfg['Servers'][$i]['favorite'] = 'pma__favorite';
// $cfg['Servers'][$i]['users'] = 'pma__users';
// $cfg['Servers'][$i]['usergroups'] = 'pma__usergroups';
// $cfg['Servers'][$i]['navigationhiding'] = 'pma__navigationhiding';
// $cfg['Servers'][$i]['savedsearches'] = 'pma__savedsearches';
// $cfg['Servers'][$i]['central_columns'] = 'pma__central_columns';
// $cfg['Servers'][$i]['designer_settings'] = 'pma__designer_settings';
// $cfg['Servers'][$i]['export_templates'] = 'pma__export_templates';
/**
* End of servers configuration
*/
/**
* Directories for saving/loading files from server
*/
$cfg['UploadDir'] = '';
$cfg['SaveDir'] = '';
/**
* Whether to display icons or text or both icons and text in table row
* action segment. Value can be either of 'icons', 'text' or 'both'.
* default = 'both'
*/
//$cfg['RowActionType'] = 'icons';
/**
* Defines whether a user should be displayed a "show all (records)"
* button in browse mode or not.
* default = false
*/
//$cfg['ShowAll'] = true;
/**
* Number of rows displayed when browsing a result set. If the result
* set contains more rows, "Previous" and "Next".
* Possible values: 25, 50, 100, 250, 500
* default = 25
*/
//$cfg['MaxRows'] = 50;
/**
* Disallow editing of binary fields
* valid values are:
* false allow editing
* 'blob' allow editing except for BLOB fields
* 'noblob' disallow editing except for BLOB fields
* 'all' disallow editing
* default = 'blob'
*/
//$cfg['ProtectBinary'] = false;
/**
* Default language to use, if not browser-defined or user-defined
* (you find all languages in the locale folder)
* uncomment the desired line:
* default = 'en'
*/
//$cfg['DefaultLang'] = 'en';
//$cfg['DefaultLang'] = 'de';
/**
* How many columns should be used for table display of a database?
* (a value larger than 1 results in some information being hidden)
* default = 1
*/
//$cfg['PropertiesNumColumns'] = 2;
/**
* Set to true if you want DB-based query history.If false, this utilizes
* JS-routines to display query history (lost by window close)
*
* This requires configuration storage enabled, see above.
* default = false
*/
//$cfg['QueryHistoryDB'] = true;
/**
* When using DB-based query history, how many entries should be kept?
* default = 25
*/
//$cfg['QueryHistoryMax'] = 100;
/**
* Whether or not to query the user before sending the error report to
* the phpMyAdmin team when a JavaScript error occurs
*
* Available options
* ('ask' | 'always' | 'never')
* default = 'ask'
*/
//$cfg['SendErrorReports'] = 'always';
/**
* You can find more configuration options in the documentation
* in the doc/ folder or at <https://docs.phpmyadmin.net/>.
*/

View File

@ -1,4 +0,0 @@
#!/bin/sh
telegraf &
php-fpm7 &
nginx -g 'daemon off;'

View File

@ -1,32 +0,0 @@
FROM alpine
RUN sleep 10
RUN apk update
RUN apk add openssl
RUN apk add nginx
RUN apk add php7
RUN apk add php7-fpm
RUN apk add php7-mysqli
RUN apk add php7-gd
RUN apk add php7-mbstring
RUN apk add php7-curl
RUN apk add php7-json
RUN apk add php7-xml
RUN apk add php7-zip
RUN apk add telegraf
COPY srcs/start.sh /root/start.sh
COPY srcs/nginx.conf /etc/nginx/nginx.conf
COPY srcs/telegraf.conf /etc/telegraf/telegraf.conf
COPY srcs/wordpress.conf /var/www/wordpress/wp-config.php
WORKDIR /root/
RUN wget https://wordpress.org/latest.tar.gz
RUN tar -xvf latest.tar.gz
RUN mv wordpress/* /var/www/wordpress/
RUN chown -R root:root /var/www
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
RUN mv nginx.crt /etc/ssl/certs/nginx.crt
RUN mv nginx.key /etc/ssl/private/nginx.key
RUN chmod 600 /etc/ssl/certs/nginx.crt /etc/ssl/private/nginx.key
CMD sh start.sh
EXPOSE 5050/tcp

View File

@ -1,50 +0,0 @@
user root;
worker_processes auto;
error_log /var/log/nginx/error.log;
error_log /var/log/nginx/error.log notice;
error_log /var/log/nginx/error.log info;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
access_log /var/log/nginx/access.log;
sendfile on;
keepalive_timeout 3600;
gzip on;
gzip_comp_level 6;
gzip_vary on;
gzip_types text/plain text/css application/json application/x-javascript application/javascript text/xml application/xml application/rss+xml text/javascript image/svg+xml application/vnd.ms-fontobject application/x-font-ttf font/opentype;
server {
listen 5050 ssl default_server;
ssl_certificate /etc/ssl/certs/nginx.crt;
ssl_certificate_key /etc/ssl/private/nginx.key;
root /var/www/wordpress;
index index.php index.html index.htm;
server_name localhost;
location / {
autoindex on;
try_files $uri $uri/ =404;
}
location ~ \.php$ {
include fastcgi.conf;
include fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
}
}
# server {
# listen 5050;
# return 301 https://$host$request_uri:5050;
# }
}

View File

@ -1,4 +0,0 @@
#!/bin/sh
telegraf &
php-fpm7 &
nginx -g 'daemon off;'

View File

@ -1,94 +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 */
define( 'DB_NAME', 'wordpress' );
/** MySQL database username */
define( 'DB_USER', 'wordpress' );
/** MySQL database password */
define( 'DB_PASSWORD', 'password' );
/** MySQL hostname */
define( 'DB_HOST', 'mariadb' );
/** 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', 'http://' . $_SERVER['HTTP_HOST'] . '/');
define('WP_HOME', 'https://' . $_SERVER['HTTP_HOST'] . '/');
/**#@+
* 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 );
/* 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';