「✨」 feat: Added static website
@ -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
|
||||
|
11
srcs/docker/bonus/compose.yml
Normal 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
|
8
srcs/docker/bonus/static-site/Dockerfile
Normal 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/
|
9
srcs/docker/bonus/static-site/cert.sh
Normal 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
|
BIN
srcs/docker/bonus/static-site/kanel.ovh/img/1.jpg
Normal file
After Width: | Height: | Size: 1.1 MiB |
BIN
srcs/docker/bonus/static-site/kanel.ovh/img/10.jpg
Normal file
After Width: | Height: | Size: 674 KiB |
BIN
srcs/docker/bonus/static-site/kanel.ovh/img/11.jpg
Normal file
After Width: | Height: | Size: 1.0 MiB |
BIN
srcs/docker/bonus/static-site/kanel.ovh/img/12.jpg
Normal file
After Width: | Height: | Size: 730 KiB |
BIN
srcs/docker/bonus/static-site/kanel.ovh/img/13.jpg
Normal file
After Width: | Height: | Size: 1.3 MiB |
BIN
srcs/docker/bonus/static-site/kanel.ovh/img/14.jpg
Normal file
After Width: | Height: | Size: 715 KiB |
BIN
srcs/docker/bonus/static-site/kanel.ovh/img/15.jpg
Normal file
After Width: | Height: | Size: 505 KiB |
BIN
srcs/docker/bonus/static-site/kanel.ovh/img/16.jpg
Normal file
After Width: | Height: | Size: 971 KiB |
BIN
srcs/docker/bonus/static-site/kanel.ovh/img/17.jpg
Normal file
After Width: | Height: | Size: 2.2 MiB |
BIN
srcs/docker/bonus/static-site/kanel.ovh/img/18.jpg
Normal file
After Width: | Height: | Size: 523 KiB |
BIN
srcs/docker/bonus/static-site/kanel.ovh/img/19.jpg
Normal file
After Width: | Height: | Size: 948 KiB |
BIN
srcs/docker/bonus/static-site/kanel.ovh/img/2.jpg
Normal file
After Width: | Height: | Size: 1.0 MiB |
BIN
srcs/docker/bonus/static-site/kanel.ovh/img/20.jpg
Normal file
After Width: | Height: | Size: 927 KiB |
BIN
srcs/docker/bonus/static-site/kanel.ovh/img/21.jpg
Normal file
After Width: | Height: | Size: 571 KiB |
BIN
srcs/docker/bonus/static-site/kanel.ovh/img/22.jpg
Normal file
After Width: | Height: | Size: 697 KiB |
BIN
srcs/docker/bonus/static-site/kanel.ovh/img/23.jpg
Normal file
After Width: | Height: | Size: 879 KiB |
BIN
srcs/docker/bonus/static-site/kanel.ovh/img/24.jpg
Normal file
After Width: | Height: | Size: 907 KiB |
BIN
srcs/docker/bonus/static-site/kanel.ovh/img/25.jpg
Normal file
After Width: | Height: | Size: 288 KiB |
BIN
srcs/docker/bonus/static-site/kanel.ovh/img/26.jpg
Normal file
After Width: | Height: | Size: 2.3 MiB |
BIN
srcs/docker/bonus/static-site/kanel.ovh/img/27.jpg
Normal file
After Width: | Height: | Size: 1.0 MiB |
BIN
srcs/docker/bonus/static-site/kanel.ovh/img/28.jpg
Normal file
After Width: | Height: | Size: 1.3 MiB |
BIN
srcs/docker/bonus/static-site/kanel.ovh/img/29.jpg
Normal file
After Width: | Height: | Size: 1.5 MiB |
BIN
srcs/docker/bonus/static-site/kanel.ovh/img/3.jpg
Normal file
After Width: | Height: | Size: 1001 KiB |
BIN
srcs/docker/bonus/static-site/kanel.ovh/img/30.jpg
Normal file
After Width: | Height: | Size: 1011 KiB |
BIN
srcs/docker/bonus/static-site/kanel.ovh/img/31.jpg
Normal file
After Width: | Height: | Size: 935 KiB |
BIN
srcs/docker/bonus/static-site/kanel.ovh/img/32.jpg
Normal file
After Width: | Height: | Size: 986 KiB |
BIN
srcs/docker/bonus/static-site/kanel.ovh/img/33.jpg
Normal file
After Width: | Height: | Size: 476 KiB |
BIN
srcs/docker/bonus/static-site/kanel.ovh/img/34.jpg
Normal file
After Width: | Height: | Size: 1.4 MiB |
BIN
srcs/docker/bonus/static-site/kanel.ovh/img/35.jpg
Normal file
After Width: | Height: | Size: 1.5 MiB |
BIN
srcs/docker/bonus/static-site/kanel.ovh/img/36.jpg
Normal file
After Width: | Height: | Size: 715 KiB |
BIN
srcs/docker/bonus/static-site/kanel.ovh/img/37.jpg
Normal file
After Width: | Height: | Size: 822 KiB |
BIN
srcs/docker/bonus/static-site/kanel.ovh/img/38.jpg
Normal file
After Width: | Height: | Size: 732 KiB |
BIN
srcs/docker/bonus/static-site/kanel.ovh/img/39.jpg
Normal file
After Width: | Height: | Size: 769 KiB |
BIN
srcs/docker/bonus/static-site/kanel.ovh/img/4.jpg
Normal file
After Width: | Height: | Size: 1.1 MiB |
BIN
srcs/docker/bonus/static-site/kanel.ovh/img/40.jpg
Normal file
After Width: | Height: | Size: 1.0 MiB |
BIN
srcs/docker/bonus/static-site/kanel.ovh/img/41.jpg
Normal file
After Width: | Height: | Size: 807 KiB |
BIN
srcs/docker/bonus/static-site/kanel.ovh/img/42.jpg
Normal file
After Width: | Height: | Size: 803 KiB |
BIN
srcs/docker/bonus/static-site/kanel.ovh/img/43.jpg
Normal file
After Width: | Height: | Size: 1.1 MiB |
BIN
srcs/docker/bonus/static-site/kanel.ovh/img/44.jpg
Normal file
After Width: | Height: | Size: 336 KiB |
BIN
srcs/docker/bonus/static-site/kanel.ovh/img/45.jpg
Normal file
After Width: | Height: | Size: 807 KiB |
BIN
srcs/docker/bonus/static-site/kanel.ovh/img/46.jpg
Normal file
After Width: | Height: | Size: 869 KiB |
BIN
srcs/docker/bonus/static-site/kanel.ovh/img/47.jpg
Normal file
After Width: | Height: | Size: 1.1 MiB |
BIN
srcs/docker/bonus/static-site/kanel.ovh/img/48.jpg
Normal file
After Width: | Height: | Size: 678 KiB |
BIN
srcs/docker/bonus/static-site/kanel.ovh/img/49.jpg
Normal file
After Width: | Height: | Size: 907 KiB |
BIN
srcs/docker/bonus/static-site/kanel.ovh/img/5.jpg
Normal file
After Width: | Height: | Size: 65 KiB |
BIN
srcs/docker/bonus/static-site/kanel.ovh/img/50.jpg
Normal file
After Width: | Height: | Size: 2.0 MiB |
BIN
srcs/docker/bonus/static-site/kanel.ovh/img/51.jpg
Normal file
After Width: | Height: | Size: 795 KiB |
BIN
srcs/docker/bonus/static-site/kanel.ovh/img/52.jpg
Normal file
After Width: | Height: | Size: 885 KiB |
BIN
srcs/docker/bonus/static-site/kanel.ovh/img/53.jpg
Normal file
After Width: | Height: | Size: 1.2 MiB |
BIN
srcs/docker/bonus/static-site/kanel.ovh/img/54.jpg
Normal file
After Width: | Height: | Size: 966 KiB |
BIN
srcs/docker/bonus/static-site/kanel.ovh/img/55.jpg
Normal file
After Width: | Height: | Size: 1.1 MiB |
BIN
srcs/docker/bonus/static-site/kanel.ovh/img/56.jpg
Normal file
After Width: | Height: | Size: 885 KiB |
BIN
srcs/docker/bonus/static-site/kanel.ovh/img/57.jpg
Normal file
After Width: | Height: | Size: 598 KiB |
BIN
srcs/docker/bonus/static-site/kanel.ovh/img/58.jpg
Normal file
After Width: | Height: | Size: 1.3 MiB |
BIN
srcs/docker/bonus/static-site/kanel.ovh/img/59.jpg
Normal file
After Width: | Height: | Size: 1.1 MiB |
BIN
srcs/docker/bonus/static-site/kanel.ovh/img/6.jpg
Normal file
After Width: | Height: | Size: 747 KiB |
BIN
srcs/docker/bonus/static-site/kanel.ovh/img/60.jpg
Normal file
After Width: | Height: | Size: 1.0 MiB |
BIN
srcs/docker/bonus/static-site/kanel.ovh/img/61.jpg
Normal file
After Width: | Height: | Size: 1.4 MiB |
BIN
srcs/docker/bonus/static-site/kanel.ovh/img/62.jpg
Normal file
After Width: | Height: | Size: 737 KiB |
BIN
srcs/docker/bonus/static-site/kanel.ovh/img/63.jpg
Normal file
After Width: | Height: | Size: 815 KiB |
BIN
srcs/docker/bonus/static-site/kanel.ovh/img/64.jpg
Normal file
After Width: | Height: | Size: 655 KiB |
BIN
srcs/docker/bonus/static-site/kanel.ovh/img/65.jpg
Normal file
After Width: | Height: | Size: 715 KiB |
BIN
srcs/docker/bonus/static-site/kanel.ovh/img/66.jpg
Normal file
After Width: | Height: | Size: 1005 KiB |
BIN
srcs/docker/bonus/static-site/kanel.ovh/img/67.jpg
Normal file
After Width: | Height: | Size: 121 KiB |
BIN
srcs/docker/bonus/static-site/kanel.ovh/img/68.jpg
Normal file
After Width: | Height: | Size: 956 KiB |
BIN
srcs/docker/bonus/static-site/kanel.ovh/img/69.jpg
Normal file
After Width: | Height: | Size: 1.7 MiB |
BIN
srcs/docker/bonus/static-site/kanel.ovh/img/7.jpg
Normal file
After Width: | Height: | Size: 1017 KiB |
BIN
srcs/docker/bonus/static-site/kanel.ovh/img/70.jpg
Normal file
After Width: | Height: | Size: 593 KiB |
BIN
srcs/docker/bonus/static-site/kanel.ovh/img/8.jpg
Normal file
After Width: | Height: | Size: 830 KiB |
BIN
srcs/docker/bonus/static-site/kanel.ovh/img/9.jpg
Normal file
After Width: | Height: | Size: 1.1 MiB |
15
srcs/docker/bonus/static-site/kanel.ovh/index.html
Normal 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>
|
24
srcs/docker/bonus/static-site/kanel.ovh/script.js
Normal 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();
|
28
srcs/docker/bonus/static-site/kanel.ovh/style.css
Normal 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;
|
||||
}
|
17
srcs/docker/bonus/static-site/www.conf.template
Normal 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;
|
||||
}
|
||||
}
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|