Compare commits

4 Commits

Author SHA1 Message Date
8a0b002a03 Tracking added
All checks were successful
Build and Deploy Zola Website / build_and_deploy (push) Successful in 12s
2024-11-16 20:28:38 +01:00
5623e8ab00 Zola workflow updated
All checks were successful
Build and Deploy Zola Website / build_and_deploy (push) Successful in 16s
2024-10-14 17:03:56 +02:00
0e034f3382 Merge branch 'fr/analytics' 2024-09-11 20:07:51 +02:00
29ccd54013 Added: analytics script
All checks were successful
Build Zola Website / build (pull_request) Successful in 20s
2024-09-11 19:55:36 +02:00
22 changed files with 30 additions and 558 deletions

View File

@@ -1,10 +0,0 @@
all: clean format build
format:
biome format --write .
build:
zola build
clean:
rm -rf public/

View File

@@ -1,15 +0,0 @@
{
"$schema": "https://biomejs.dev/schemas/1.7.3/schema.json",
"files": {
"ignore": [".vscode/", "node_modules/", "public/"]
},
"organizeImports": {
"enabled": true
},
"linter": {
"enabled": false,
"rules": {
"recommended": true
}
}
}

View File

@@ -1,5 +1,5 @@
# The URL the site will be built for
base_url = "https://dev.filiprojek.cz"
base_url = "https://www.filiprojek.cz"
title = "Filip Rojek"
compile_sass = true
@@ -17,8 +17,8 @@ smart_punctuation = true
git = "https://git.filiprojek.cz/fr/website"
nav_items = [
{name="Home", path="/"},
{name="About", path="/about"},
{name="Projects", path="/projects/"},
{name="Posts", path="/posts"}
#{name="About", path="/about"},
#{name="Projects", path="/projects/"},
#{name="Posts", path="/posts"}
]

View File

@@ -1,27 +0,0 @@
+++
title = "About"
template = "about.html"
+++
## About
I am student of IT at Charles University in Prague (Faculty of Education).
My programming journey began in high school, where I developed a passion for `Linux` and co-founded [Fofrweb](https://fofrweb.com). Together with a classmate, I created web applications using `Node.js` and `Vue.js`, all hosted on my own Linux server.
As a member of [Microlab](https://microlab.space), the university's hacker space, I engage with fellow tech enthusiasts. Additionally, I contribute to the open-source community as a package maintainer for [Void Linux](https://voidlinux.org).
## Work
I currently work as a Linux engineer. Most of my work involves Debian based systems - desktops (Raspberry Pi, Intel NUC) and servers.
I also create custom websites from time to time.
## Projects
Most of my projects are hosted on Gitea and GitHub:
- Gitea: [git.filiprojek.cz](https://git.filiprojek.cz/fr)
- GitHub: [github.com/filiprojek](https://github.com/filiprojek)
## Contact
- <a href="mailto:&#102;&#105;&#108;&#105;&#112;&#064;&#102;&#105;&#108;&#105;&#112;&#114;&#111;&#106;&#101;&#107;&#046;&#099;&#122;">&#102;&#105;&#108;&#105;&#112;&#064;&#102;&#105;&#108;&#105;&#112;&#114;&#111;&#106;&#101;&#107;&#046;&#099;&#122;</a>
- [@filiprojek](https://t.me/filiprojek) on Telegram
- PGP: [0x7E65EA58C6075F09](https://keys.openpgp.org/vks/v1/by-fingerprint/CA3D9BE28315B49164130CD97E65EA58C6075F09)

View File

@@ -1,7 +0,0 @@
+++
title = "Posts"
template = "post_list.html"
page_template = "post.html"
sort_by = "date"
+++

View File

@@ -1,193 +0,0 @@
+++
title = "Jellyfin"
date = 2024-10-03
description = "Hosting a Jellyfin Instance with Docker and Docker Compose"
+++
# Hosting a Jellyfin Instance with Docker and Docker Compose
Running your own media server is a great way to have complete control over your media library, and Jellyfin is one of the best open-source media server solutions available today. With Docker and Docker Compose, you can efficiently manage and scale your Jellyfin instance, along with useful companion services like Jellyseerr and Jellystat for enhanced functionality.
In this article, Ill walk through my setup of a Jellyfin media server, hosted in Docker using Docker Compose. This assumes you already have Docker and Docker Compose installed and are comfortable with Linux environments. Ill cover the configuration of Jellyfin, hardware transcoding, and the integration of supporting services like Jellyseerr and Jellystat to manage requests and track server statistics.
## Docker Compose Configuration Breakdown
Heres the Docker Compose file I use to deploy Jellyfin and its associated services.
```yaml
services:
jellyfin:
image: jellyfin/jellyfin:latest
container_name: jellyfin
user: 1000:1000
restart: 'unless-stopped'
devices:
- /dev/dri:/dev/dri # for hardware transcoding
- /dev/dri/renderD128:/dev/dri/renderD128
#- /dev/kfd:/dev/kfd # Remove this device if you don't use the OpenCL tone-mapping
group_add:
- "103" # render gid
- "27" # video gid
networks:
- default
ports:
- 5100:8096
volumes:
- ./config:/config
- ./cache:/cache
- /mnt/media/torrent:/media:ro
- /dev/shm:/data/transcode # Offload transcoding to RAM if you have enough RAM
environment:
- JELLYFIN_PublishedServerUrl=https://your.host.com
jellyseerr:
image: fallenbagel/jellyseerr:latest
container_name: jellyseerr
environment:
- LOG_LEVEL=debug
- TZ=Europe/Prague
ports:
- 5280:5055
volumes:
- ./jellyseerr-config:/app/config
restart: unless-stopped
jellystat-db:
image: postgres:15.2
container_name: jellystat-db
restart: unless-stopped
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: <password>
volumes:
- ./jellystat-db:/var/lib/postgresql/data
jellystat:
image: cyfershepard/jellystat:latest
container_name: jellystat
restart: unless-stopped
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: <password>
POSTGRES_IP: jellystat-db
POSTGRES_PORT: 5432
JWT_SECRET: <jwt_secret>
TZ: Europe/Prague
volumes:
- ./jellystat-data:/app/backend/backup-data
ports:
- "5110:3000"
depends_on:
- jellystat-db
```
## Jellyfin Service
The core of this setup is the jellyfin service. This container runs the Jellyfin server itself, and the configuration is designed to optimize performance and security.
### Hardware Transcoding
For efficient media transcoding, Ive configured Jellyfin to leverage the hardware capabilities of the host machine. Specifically, Ive mounted the /dev/dri device to the container for Intel or AMD GPU transcoding:
```yaml
devices:
- /dev/dri:/dev/dri
- /dev/dri/renderD128:/dev/dri/renderD128
```
If you dont need OpenCL tone-mapping, you can skip the /dev/kfd device. By adding the necessary GIDs (103 for render and 27 for video), the container has access to GPU resources.
Additionally, Ive offloaded transcoding operations to the systems RAM by mounting /dev/shm as the transcode directory:
```yaml
volumes:
- /dev/shm:/data/transcode
```
This is particularly useful if you have sufficient RAM, as it improves transcoding performance by avoiding disk I/O overhead.
### Storage
In the `volumes` section, Ive mounted the following directories:
- `./config:/config`: Stores Jellyfins configuration data.
- `./cache:/cache`: Holds cache data to improve performance.
- `/mnt/media/torrent:/media:ro`: This is the read-only mount where Jellyfin accesses my media library. Its pointed to my torrent directory, ensuring that Jellyfin can index and serve files from there but not modify them.
### Network and Ports
The Jellyfin server is exposed on port `5100` (mapped to Jellyfins default 8096 internal port). I also set the JELLYFIN_PublishedServerUrl environment variable to make sure the correct public URL is used for generating media links and external access.
## Jellyseerr for Media Requests
Jellyseerr is a companion service to Jellyfin, allowing users to request new content directly from the web interface. Heres how Ive integrated it:
```yaml
jellyseerr:
image: fallenbagel/jellyseerr:latest
container_name: jellyseerr
environment:
- LOG_LEVEL=debug
- TZ=Europe/Prague
ports:
- 5280:5055
volumes:
- ./jellyseerr-config:/app/config
restart: unless-stopped
```
Ive exposed Jellyseerr on port `5280` and linked it to the default timezone (`Europe/Prague` in my case). Its important to store the Jellyseerr configuration separately in the `./jellyseerr-config` directory to persist user settings and requests.
## Jellystat for Tracking Server Stats
Jellystat adds another layer of utility, giving you the ability to track detailed statistics about your Jellyfin server usage, including playback metrics, user activity, and media insights.
It relies on a PostgreSQL database (`jellystat-db` service) to store all the data. Ive configured it like this:
```yaml
jellystat-db:
image: postgres:15.2
container_name: jellystat-db
restart: unless-stopped
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: <password>
volumes:
- ./jellystat-db:/var/lib/postgresql/data
```
Jellystat then communicates with the PostgreSQL instance:
```yaml
jellystat:
image: cyfershepard/jellystat:latest
container_name: jellystat
restart: unless-stopped
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: <password>
POSTGRES_IP: jellystat-db
POSTGRES_PORT: 5432
JWT_SECRET: <jwt_secret>
TZ: Europe/Prague
volumes:
- ./jellystat-data:/app/backend/backup-data
ports:
- "5110:3000"
depends_on:
- jellystat-db
```
In this configuration, Jellystat is exposed on port `5110`, and Ive configured the necessary environment variables to link it to the `jellystat-db` container. The JWT secret is used to authenticate requests between Jellystat and Jellyfin.
# Optimizing and Securing the Setup
## 1. Automatic Restart
Each service is configured with `restart: unless-stopped`, ensuring that the containers are restarted automatically if they crash or the host reboots. This adds reliability to the deployment, minimizing downtime.
## 2. Using RAM for Transcoding
Offloading transcoding operations to RAM using `/dev/shm` significantly boosts the performance of Jellyfin, especially when dealing with multiple simultaneous streams or high-bitrate media.
## 3. Resource Isolation and Security
By specifying the `user: 1000:1000` directive in the Jellyfin container, Ive ensured that the Jellyfin service runs as a non-root user on the host. This enhances security by limiting the container's privileges. Also, mounting `/media` in read-only (`ro`) mode ensures that the Jellyfin service cannot modify the media files directly, reducing the risk of accidental data corruption.
# Conclusion
This Docker Compose setup offers a robust Jellyfin media server that takes full advantage of hardware transcoding, secure media access, and useful companion services like Jellyseerr for content requests and Jellystat for usage tracking. Docker makes it easy to maintain, update, and scale this setup with minimal hassle, ensuring you have full control over your media experience.
With this configuration, you can efficiently manage and monitor your media server, adding a layer of automation and insight to your Jellyfin instance.

View File

@@ -1,9 +0,0 @@
+++
title = "Nextcloud"
date = 2024-10-03
description = "My Nextcloud docker based instance"
+++
This is an post about my docker based Nextcloud instance

View File

@@ -1,7 +0,0 @@
+++
title = "Projects"
template = "project_list.html"
page_template = "project.html"
sort_by = "date"
+++

View File

@@ -1,18 +0,0 @@
+++
title = "Debrepo"
date = 2023-05-01
description = "A Debian repository management tool"
[extra]
state = "stable"
+++
# Debrepo
A Debian repository management tool.
## About
`Debrepo` is a software tool designed for creating and managing Debian repositories for `*.deb` packages, providing a lightweight and user-friendly alternative to more complex tools like `reprepo` or `aptly`. While these alternatives may offer more advanced features, Debrepo focuses on providing essential functionality and ease of use for repository management, allowing users to easily add, remove, and update packages within their repositories. With Debrepo, users can efficiently manage their Debian repositories without the unnecessary complexity of more advanced tools.
## Links
- [Git](https://git.filiprojek.cz/fr/debrepo)

View File

@@ -1,16 +0,0 @@
+++
title = "Dotfiles"
date = 2019-01-01
description = "Collection of my configuration dotfiles"
[extra]
state = "active"
+++
# Dotfiles
## About
- Collection of my configuration dotfiles.
## Links
- [Git](https://git.filiprojek.cz/fr/dotfiles)

View File

@@ -1,34 +0,0 @@
+++
title = "Fofrweb"
date = 2019-11-27
description = "Custom websites and student projects"
[extra]
state = "active"
+++
# About
- Lorem ipsum dolor sit amet, officia excepteur ex fugiat reprehenderit enim labore culpa sint ad nisi Lorem pariatur mollit ex esse exercitation amet. Nisi anim cupidatat excepteur officia. Reprehenderit nostrud nostrud ipsum Lorem est aliquip amet voluptate voluptate dolor minim nulla est proident. Nostrud officia pariatur ut officia. Sit irure elit esse ea nulla sunt ex occaecat reprehenderit commodo officia dolor Lorem duis laboris cupidatat officia voluptate. Culpa proident adipisicing id nulla nisi laboris ex in Lorem sunt duis officia eiusmod. Aliqua reprehenderit commodo ex non excepteur duis sunt velit enim. Voluptate laboris sint cupidatat ullamco ut ea consectetur et est culpa et culpa duis.
# Projects
## Websites
### date
### links
## FofrMess
### date
## FofrTasks
### date
## Fofrbazar
- Internetová bazarová platforma
### 04/2021
- Technologie
- PHP
- Laravel
- MySQL
- Linux
- Apache

View File

@@ -1,15 +0,0 @@
+++
title = "Nork"
date = 2021-08-13
description = "Simple node.js tool that extends express projects"
[extra]
state = "done"
+++
# Nork
## About
- Simple node.js tool that extends express projects.
## Links
- [Git](https://github.com/filiprojek/nork)

View File

@@ -1,17 +0,0 @@
+++
title = "pkmples.cz website"
date = 2023-12-18
description = "Website for PKM Ples written in Zola"
[extra]
state = "done"
+++
Website for PKM Ples written in [Zola](https://getzola.org).
I am using [Gitea Actions](https://docs.gitea.com/usage/actions/overview) for CI/CD.
It is available at [pkmples.cz](https://pkmples.cz).
Source is available on my [Gitea](https://git.filiprojek.cz/fofrweb/com_pkmples.cz).

View File

@@ -1,21 +0,0 @@
+++
title = "Self Hosting"
date = 2024-10-14
description = "My selfhosting services"
[extra]
state = "pending"
+++
# Next Cloud
Lorem ipsum dolor sit amet, officia excepteur ex fugiat reprehenderit enim labore culpa sint ad nisi Lorem pariatur mollit ex esse exercitation amet. Nisi anim cupidatat excepteur officia. Reprehenderit nostrud nostrud ipsum Lorem est aliquip amet voluptate voluptate dolor minim nulla est proident. Nostrud officia pariatur ut officia. Sit irure elit esse ea nulla sunt ex occaecat reprehenderit commodo officia dolor Lorem duis laboris cupidatat officia voluptate. Culpa proident adipisicing id nulla nisi laboris ex in Lorem sunt duis officia eiusmod. Aliqua reprehenderit commodo ex non excepteur duis sunt velit enim. Voluptate laboris sint cupidatat ullamco ut ea consectetur et est culpa et culpa duis.
# Jellyfin
Lorem ipsum dolor sit amet, officia excepteur ex fugiat reprehenderit enim labore culpa sint ad nisi Lorem pariatur mollit ex esse exercitation amet. Nisi anim cupidatat excepteur officia. Reprehenderit nostrud nostrud ipsum Lorem est aliquip amet voluptate voluptate dolor minim nulla est proident. Nostrud officia pariatur ut officia. Sit irure elit esse ea nulla sunt ex occaecat reprehenderit commodo officia dolor Lorem duis laboris cupidatat officia voluptate. Culpa proident adipisicing id nulla nisi laboris ex in Lorem sunt duis officia eiusmod. Aliqua reprehenderit commodo ex non excepteur duis sunt velit enim. Voluptate laboris sint cupidatat ullamco ut ea consectetur et est culpa et culpa duis.
# Uptime Kuma
Lorem ipsum dolor sit amet, officia excepteur ex fugiat reprehenderit enim labore culpa sint ad nisi Lorem pariatur mollit ex esse exercitation amet. Nisi anim cupidatat excepteur officia. Reprehenderit nostrud nostrud ipsum Lorem est aliquip amet voluptate voluptate dolor minim nulla est proident. Nostrud officia pariatur ut officia. Sit irure elit esse ea nulla sunt ex occaecat reprehenderit commodo officia dolor Lorem duis laboris cupidatat officia voluptate. Culpa proident adipisicing id nulla nisi laboris ex in Lorem sunt duis officia eiusmod. Aliqua reprehenderit commodo ex non excepteur duis sunt velit enim. Voluptate laboris sint cupidatat ullamco ut ea consectetur et est culpa et culpa duis.
# Gitea
Lorem ipsum dolor sit amet, officia excepteur ex fugiat reprehenderit enim labore culpa sint ad nisi Lorem pariatur mollit ex esse exercitation amet. Nisi anim cupidatat excepteur officia. Reprehenderit nostrud nostrud ipsum Lorem est aliquip amet voluptate voluptate dolor minim nulla est proident. Nostrud officia pariatur ut officia. Sit irure elit esse ea nulla sunt ex occaecat reprehenderit commodo officia dolor Lorem duis laboris cupidatat officia voluptate. Culpa proident adipisicing id nulla nisi laboris ex in Lorem sunt duis officia eiusmod. Aliqua reprehenderit commodo ex non excepteur duis sunt velit enim. Voluptate laboris sint cupidatat ullamco ut ea consectetur et est culpa et culpa duis.

View File

@@ -1,16 +0,0 @@
+++
title = "Website"
date = 2023-08-29
description = "My personal website"
[extra]
state = "in development"
+++
# Website
## About
- This website is built using the Zola static site generator.
## Links
- [Git](https://git.filiprojek.cz/fr/website)

View File

@@ -1,16 +0,0 @@
.about {
h2 {
margin-top: 1rem;
margin-bottom: .5rem;
}
h3, h4, h5, h6, p {
margin-top: .5rem;
margin-bottom: .5rem;
}
p {
text-align: justify;
}
}

View File

@@ -1,7 +1,7 @@
.content {
display: flex;
flex-direction: column;
margin: 2rem 30%;
margin: 2rem 20%;
}
.content {
@@ -18,25 +18,3 @@
margin-bottom: 1rem;
}
}
code {
font-size: 1rem;
}
ul {
list-style: none;
padding-left: 0;
li {
position: relative;
padding-left: 1rem;
}
li::before {
content: '';
position: absolute;
left: 0;
color:white;
}
}

View File

@@ -1,51 +1,23 @@
.language-yaml {
white-space: pre-wrap;
word-wrap: break-word;
overflow-x: auto;
padding: .5rem;
margin: .5rem 0;
border-radius: 5px;
}
//.project-wrapper {
// justify-content: start;
// align-items: start;
//}
//
//.left-bar {
// width: 15rem;
// justify-content: start;
// align-items: start;
// border-right: thin solid var(--c-blue);
// margin-right: 2.5rem;
// padding: 0 2.5rem;
//
// h2 {
// padding-bottom: 2.5rem;
// }
//}
.project-wrapper {
max-width: 900px;
margin: 0 auto;
padding: 20px;
h1 {
margin-top: 2.5rem;
margin-bottom: 1rem;
}
h2 {
margin-top: 1.5rem;
margin-bottom: 1rem;
}
h3, h4, h5, h6, p {
margin-top: 1rem;
margin-bottom: 1rem;
}
p {
text-align: justify;
}
display: flex;
gap: 2.5rem;
}
.link-back {
margin: 2rem 0;
}
@media (max-width: 768px) {
.project-wrapper {
max-width: 100%;
padding: 1rem;
}
}
@media (max-width: 480px) {
.project-wrapper {
padding: 5px;
}
}

View File

@@ -17,15 +17,16 @@
</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="Filip Rojek - Personal website">
<link rel="icon" type="image/x-icon" href="/img/fr.ico">
<link rel="stylesheet" href="/general.css">
<link rel="stylesheet" href="/vars.css">
<link rel="stylesheet" href="/content.css">
<link rel="stylesheet" href="/style.css">
<link rel="stylesheet" href="/home.css">
<script defer src="https://analytics.fofrweb.com/script.js" data-website-id="2b326fdd-6c87-4627-b1f1-d0afb40aeef6"></script>
{% block styles %}
{% endblock styles %}
<script defer data-domain="filiprojek.cz" src="https://analytics.fofrweb.com/js/script.js"></script>
</head>
<body>
<header>
@@ -33,7 +34,7 @@
<a href="/" class="logo">
<img src="/img/fr_logo.webp" alt="logo">
</a>
<div class="links">
<!--<div class="links">
{% for item in config.extra.nav_items %}
<a href="{{ item.path }}"
{% if item.path == current_path and item.path != "/" %}
@@ -41,7 +42,7 @@
{% endif %}
>{{ item.name }}</a>
{% endfor %}
</div>
</div>-->
</nav>
</header>
@@ -57,16 +58,12 @@
{% endblock content %}
</main>
<footer>
<p>Build time: {{ now() | date(format="%Y-%m-%d %H:%M") }},
{% if config.extra.git %}
<a href="{{ config.extra.git }}" target="_blank">Source</a>
{% endif %}</p>
<p>&copy; filiprojek.cz 2022 - {{ now() | date(format="%Y")}}</p>
</footer>
<script>
console.log("I heard that a cool frontend developer works for https://fofrweb.com")
</script>
</body>
</html>

View File

@@ -1,26 +0,0 @@
{% extends "base.html" %}
{% block styles %}
<link rel="stylesheet" href="/project.css">
{% endblock styles %}
{% block content %}
<section class="project-wrapper flex-col">
<!--
<section class="left-bar flex-col">
<h2>Projects</h2>
{% set section = get_section(path=page.ancestors | last) %}
{% for project in section.pages %}
<a href="{{ project.permalink }}">{{project.title}}</a>
{% endfor %}
</section>
-->
<!-- <h2>{{ page.title }}</h2> -->
<div>
{{ page.content | safe }}
</div>
<a href="/posts" class="link-back">Back to list of posts</a>
</section>
{% endblock content %}

View File

@@ -1,28 +0,0 @@
{% extends "base.html" %}
{% block styles %}
<link rel="stylesheet" href="/project_list.css">
{% endblock styles %}
{% block content %}
<section class="project-list content">
<h1>My Posts</h1>
{% for post in section.pages %}
<div class="project">
<a class="title" href="{{ post.permalink }}">
{{ post.title }}
</a>
<p class="description">
{% if post.description %}
{{ post.description }}
{% else %}
&hellip;
{% endif %}
</p>
<hr>
<p>{{ post.date }}</p>
</div>
{% endfor %}
</section>
{% endblock content %}

View File

@@ -20,7 +20,7 @@
<div>
{{ page.content | safe }}
</div>
<a href="/projects" class="link-back">Back to list of projects</a>
<a href="/projects">Back to list of projects</a>
</section>
{% endblock content %}