1
0

」 feat: Added static website

This commit is contained in:
2025-02-22 16:56:23 +01:00
parent 05d2f7a981
commit b3dc6ebb98
81 changed files with 120 additions and 3 deletions

View File

@ -3,11 +3,15 @@ name: inception
volumes:
wp-db:
wp-site:
nginx-certs:
networks:
inception:
external: false
include:
- docker/bonus/compose.yml
services:
nginx:
container_name: inception-nginx
@ -30,6 +34,7 @@ services:
- wp-site:/var/www/wordpress
- ./configs/nginx/templates:/etc/nginx/templates
- ./configs/nginx/entry:/docker-entrypoint.d
- nginx-certs:/etc/nginx/ssl
ports:
- "8443:8443"
restart: unless-stopped

View File

@ -0,0 +1,11 @@
services:
static-site:
build: static-site
ports:
- 8080:443
depends_on:
- nginx
environment:
- TZ=Europe/Paris
- NGINX_SSL_KEY_FILE=/etc/nginx/ssl/kanel-wp.key
- NGINX_SSL_CERT_FILE=/etc/nginx/ssl/kanel-wp.crt

View File

@ -0,0 +1,8 @@
FROM inception-nginx
LABEL maintainer="KeyZox"
COPY kanel.ovh/ /var/www/html/
COPY --chmod=644 www.conf.template /etc/nginx/templates/www.conf.template
COPY --chmod=644 cert.sh /docker-entrypoint.d/

View File

@ -0,0 +1,9 @@
#!/bin/sh
if [ ! -f ${NGINX_SSL_KEY_FILE} ]; then
echo "Generating certs"
mkdir -p /etc/nginx/ssl
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout ${NGINX_SSL_KEY_FILE} -out ${NGINX_SSL_CERT_FILE} -subj "/C=FR/ST=IDF/L=Angouleme/O=42/OU=42/CN=kanel.ovh/UID=adjoly"
else
printf "Key already exist not recreating\n"
fi

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 674 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 730 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 715 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 505 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 971 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 523 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 948 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 927 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 571 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 697 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 879 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 907 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 288 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1001 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1011 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 935 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 986 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 476 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 715 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 822 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 732 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 769 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 807 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 803 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 336 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 807 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 869 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 678 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 907 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 795 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 885 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 966 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 885 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 598 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 747 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 737 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 815 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 655 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 715 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1005 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 121 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 956 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1017 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 593 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 830 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

View File

@ -0,0 +1,15 @@
<!DOCTYPE html>
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Kanel Supremacy</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="image-container">
<img id="kanel" src="#">
</div>
<script type="text/javascript" src="script.js"></script>
</body>
</html>

View File

@ -0,0 +1,24 @@
function init()
{
var img = document.querySelector("#kanel");
const random = Math.floor(Math.random() * 70) + 1;
img.src = 'img/'+random+'.jpg';
const { naturalWidth, naturalHeight } = img;
const isLandscape = naturalWidth / naturalHeight > 1;
if (isLandscape) {
img.style.width = window.innerWidth+'px';
img.style.height = 'auto';
} else {
img.style.height = window.innerHeight+'px';
img.style.width = 'auto';
}
if (img.src == 'img/70.jpg')
{
img.style.height = 'auto';
img.style.width = '100%';
}
}
init();

View File

@ -0,0 +1,28 @@
body, html
{
margin: 0;
padding: 0;
display: flex;
align-items: center;
justify-content: center;
background-color: #f0f0f0;
overflow: hidden;
box-sizing: border-box;
}
.image-container
{
width: 100%;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
overflow: hidden;
position: relative;
}
.img
{
width: 100%;
height: auto;
}

View File

@ -0,0 +1,17 @@
server {
listen 0.0.0.0:443 ssl;
root /var/www/html;
index index.html;
ssl_certificate $NGINX_SSL_CERT_FILE;
ssl_certificate_key $NGINX_SSL_KEY_FILE;
ssl_protocols TLSv1.2 TLSv1.3;
ssl_session_timeout 10m;
keepalive_timeout 60;
location / {
try_files $${q}uri $${q}uri/ =404;
}
}

View File

@ -39,4 +39,4 @@ WORKDIR /var/lib/mysql
EXPOSE 3306
CMD [ "mariadbd", "--user=mysql" ]
HEALTHCHECK --interval=30s --timeout=10s --retries=3 --start-period=1s --start-interval=2s CMD /docker-healthcheck
HEALTHCHECK --interval=30s --timeout=10s --retries=3 --start-period=3s --start-interval=2s CMD /docker-healthcheck

View File

@ -37,4 +37,4 @@ STOPSIGNAL SIGQUIT
EXPOSE 80
CMD [ "nginx", "-g", "daemon off;" ]
HEALTHCHECK --interval=30s --timeout=10s --retries=3 --start-period=1s --start-interval=2s CMD curl http://127.0.0.1:80/health || exit 1
HEALTHCHECK --interval=30s --timeout=10s --retries=3 --start-period=3s --start-interval=2s CMD curl http://127.0.0.1:80/health || exit 1

View File

@ -58,4 +58,4 @@ STOPSIGNAL SIGQUIT
EXPOSE 9000
CMD [ "php-fpm84", "-F" ]
HEALTHCHECK --interval=30s --timeout=10s --retries=3 --start-period=1s --start-interval=2s CMD cgi-fcgi -bind -connect 127.0.0.1:${PHP_PORT:-9000} || exit 1
HEALTHCHECK --interval=30s --timeout=10s --retries=3 --start-period=3s --start-interval=2s CMD cgi-fcgi -bind -connect 127.0.0.1:${PHP_PORT:-9000} || exit 1