Compare commits
2 commits
d7190fcf6e
...
fc7e2ec06d
Author | SHA1 | Date | |
---|---|---|---|
fc7e2ec06d | |||
675762fe6d |
2
env.yml
|
@ -92,7 +92,7 @@ users:
|
|||
etebase: 373
|
||||
hedgedoc: 1004
|
||||
hedgedoc_mysql: 1005
|
||||
homepage: 101
|
||||
homepage: 8686
|
||||
searxng: 977
|
||||
searxng_redis: 999
|
||||
synapse: 991
|
||||
|
|
Before Width: | Height: | Size: 251 KiB |
Before Width: | Height: | Size: 10 KiB |
Before Width: | Height: | Size: 978 B |
Before Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 34 KiB |
|
@ -1,69 +0,0 @@
|
|||
body {
|
||||
font-weight: bold;
|
||||
font-family: Arial;
|
||||
background-image: url("wallpaper.jpg");
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
background-size: cover;
|
||||
min-height: 100vh;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
div {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
flex-wrap: wrap;
|
||||
align-content: center;
|
||||
min-height: 100vh;
|
||||
width: 65%;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
div a {
|
||||
border: 3px solid white;
|
||||
border-radius: 2px;
|
||||
padding: 12px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin: 35px;
|
||||
min-width: 300px;
|
||||
height: 60px;
|
||||
transition: all .25s ease-in-out;
|
||||
text-decoration: none;
|
||||
color: white;
|
||||
font-size: 1.2em;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
div a:hover {
|
||||
transform: scale(1.1);
|
||||
background-color: rgba(255, 255, 255, 0.25);
|
||||
}
|
||||
|
||||
img {
|
||||
height: 86%;
|
||||
}
|
||||
|
||||
main > a {
|
||||
font-size: 0.9em;
|
||||
color: white;
|
||||
text-decoration: none;
|
||||
position: absolute;
|
||||
bottom: 8px;
|
||||
right: 8px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
main > a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
@media only screen and (orientation: landscape) {
|
||||
div {
|
||||
flex-direction: row;
|
||||
}
|
||||
}
|
|
@ -1,49 +0,0 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta property="og:title" content="Homepage - Viyurz.fr">
|
||||
<meta property="og:type" content="website">
|
||||
<meta property="og:url" content="https://viyurz.fr">
|
||||
<meta property="og:description" content="Viyurz.fr homepage.">
|
||||
<meta property="og:image" content="https://viyurz.fr/logo.jpg">
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
|
||||
<link rel="stylesheet" href="index.css">
|
||||
<title>Homepage - Viyurz.fr</title>
|
||||
</head>
|
||||
<body>
|
||||
<main>
|
||||
<div>
|
||||
<a href="https://element.viyurz.fr">
|
||||
<img src="matrix.png" alt="Matrix logo">
|
||||
<p>Element/Matrix</p>
|
||||
</a>
|
||||
<a href="https://etebase.viyurz.fr">
|
||||
<img src="etesync.png" alt="EteSync logo">
|
||||
<p>EteSync</p>
|
||||
</a>
|
||||
<a href="https://nc.viyurz.fr">
|
||||
<img src="nextcloud.png" alt="NextCloud logo">
|
||||
<p>Nextcloud</p>
|
||||
</a>
|
||||
<a href="https://searx.viyurz.fr">
|
||||
<img src="searxng.png" alt="SearXNG logo">
|
||||
<p>SearXNG</p>
|
||||
</a>
|
||||
<a href="https://vw.viyurz.fr">
|
||||
<img src="vaultwarden.png" alt="Vaultwarden logo">
|
||||
<p>Vaultwarden</p>
|
||||
</a>
|
||||
<!--
|
||||
<a href='steam://connect/ark.viyurz.fr:27015'>
|
||||
<img src="ark.png" alt="ARK: Survival Evolved logo">
|
||||
<p>ARK: Survival Evolved</p>
|
||||
</a>
|
||||
-->
|
||||
</div>
|
||||
<a target="_blank" href="https://www.pixiv.net/en/artworks/93556861">Artwork by 黒崎神楽</a>
|
||||
</main>
|
||||
</body>
|
||||
</html>
|
Before Width: | Height: | Size: 230 KiB |
Before Width: | Height: | Size: 5 KiB |
Before Width: | Height: | Size: 6.1 KiB |
Before Width: | Height: | Size: 2 KiB |
Before Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 576 KiB |
|
@ -1,43 +0,0 @@
|
|||
pid /tmp/nginx.pid;
|
||||
|
||||
worker_processes auto;
|
||||
worker_cpu_affinity auto;
|
||||
worker_rlimit_nofile 2048;
|
||||
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
http {
|
||||
charset utf-8;
|
||||
|
||||
sendfile on;
|
||||
tcp_nopush on;
|
||||
tcp_nodelay on;
|
||||
|
||||
gzip off;
|
||||
|
||||
# Hide NGINX version in error messages.
|
||||
server_tokens off;
|
||||
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
client_body_temp_path /tmp/client_temp;
|
||||
proxy_temp_path /tmp/proxy_temp_path;
|
||||
fastcgi_temp_path /tmp/fastcgi_temp;
|
||||
uwsgi_temp_path /tmp/uwsgi_temp;
|
||||
scgi_temp_path /tmp/scgi_temp;
|
||||
|
||||
server {
|
||||
listen 80 default_server;
|
||||
listen [::]:80 default_server;
|
||||
|
||||
http2 on;
|
||||
|
||||
server_name _;
|
||||
|
||||
root /mnt/index;
|
||||
}
|
||||
}
|
|
@ -11,16 +11,6 @@
|
|||
group: "{{ ansible_env['USER'] }}"
|
||||
mode: '640'
|
||||
|
||||
- name: Copy nginx.conf and index/ to project directory
|
||||
copy:
|
||||
src: "{{ role_path }}/files/"
|
||||
dest: "{{ homepage_project_dir }}"
|
||||
owner: "{{ ansible_env['USER'] }}"
|
||||
group: "{{ ansible_env['USER'] }}"
|
||||
mode: '644'
|
||||
# Store result to restart services if the file(s) changed
|
||||
register: homepage_copy_files_result
|
||||
|
||||
- name: Pull project services
|
||||
community.docker.docker_compose:
|
||||
project_src: "{{ homepage_project_dir }}"
|
||||
|
@ -38,5 +28,3 @@
|
|||
- name: Create/Restart project services
|
||||
community.docker.docker_compose:
|
||||
project_src: "{{ homepage_project_dir }}"
|
||||
# Restart if config file(s) changed
|
||||
restarted: "{{ homepage_copy_files_result['changed'] | bool }}"
|
||||
|
|
|
@ -1,11 +1,8 @@
|
|||
services:
|
||||
homepage:
|
||||
image: nginx:alpine
|
||||
restart: always
|
||||
container_name: homepage
|
||||
image: git.ahur.ac/viyurz/homepage:latest
|
||||
restart: always
|
||||
user: {{ users['homepage'] }}:{{ users['homepage'] }}
|
||||
ports:
|
||||
- 127.0.0.1:{{ ports['homepage'] }}:80
|
||||
volumes:
|
||||
- ./nginx.conf:/etc/nginx/nginx.conf
|
||||
- ./index:/mnt/index
|
||||
- 127.0.0.1:{{ ports['homepage'] }}:8080
|
||||
|
|
|
@ -37,11 +37,17 @@ table inet filter {
|
|||
|
||||
# Prevent DDoS
|
||||
# Rate limiting
|
||||
meta nfproto ipv4 meter ratelimit4 { ip saddr limit rate over 50/second } add @blackhole_ipv4 { ip saddr }
|
||||
meta nfproto ipv6 meter ratelimit6 { ip6 saddr limit rate over 50/second } add @blackhole_ipv6 { ip6 saddr }
|
||||
meta nfproto ipv4 meter ratelimit4 \
|
||||
{ ip saddr limit rate over 50/second burst 5 packets } \
|
||||
add @blackhole_ipv4 { ip saddr }
|
||||
meta nfproto ipv6 meter ratelimit6 \
|
||||
{ ip6 saddr limit rate over 50/second burst 5 packets } \
|
||||
add @blackhole_ipv6 { ip6 saddr }
|
||||
# Max concurrent connections
|
||||
meta nfproto ipv4 meter connlimit4 { ip saddr ct count over 100 } add @blackhole_ipv4 { ip saddr }
|
||||
meta nfproto ipv6 meter connlimit6 { ip6 saddr ct count over 100 } add @blackhole_ipv6 { ip6 saddr }
|
||||
meta nfproto ipv4 meter connlimit4 \
|
||||
{ ip saddr ct count over 100 } add @blackhole_ipv4 { ip saddr }
|
||||
meta nfproto ipv6 meter connlimit6 \
|
||||
{ ip6 saddr ct count over 100 } add @blackhole_ipv6 { ip6 saddr }
|
||||
|
||||
# Allow ICMP
|
||||
meta l4proto icmp accept
|
||||
|
|