Updated posts and added docker compose stack

This commit is contained in:
AderKonstantin 2025-05-18 11:56:29 +03:00
parent 9a576d9352
commit 4283932d9e
18 changed files with 189 additions and 305 deletions

27
Dockerfile Normal file
View File

@ -0,0 +1,27 @@
# Stage 1: Build the application
FROM node:23-alpine AS builder
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
# Stage 2: Run the application
FROM node:23-alpine AS runner
WORKDIR /app
ENV NODE_ENV production
ENV NEXT_TELEMETRY_DISABLED 1
RUN addgroup --system --gid 1001 nodejs
RUN adduser --system --uid 1001 nextjs
COPY --from=builder --chown=nextjs:nodejs /app/.next ./.next
COPY --from=builder /app/node_modules ./node_modules
COPY --from=builder /app/package.json ./package.json
COPY --from=builder /app/public ./public
USER nextjs
EXPOSE 3000
CMD ["npm", "start"]

View File

@ -31,3 +31,17 @@ pnpm dev
## Cloning / Forking
Please remove all of my personal information (projects, images, etc.) before deploying your own version of this site.
## Docker
First of all setup networks:
```bash
docker network create proxy
docker network create backend
```
And then start the stack:
```bash
docker-compose --env-file .env up -d --build
```

View File

@ -38,7 +38,7 @@ export const metadata: Metadata = {
},
},
icons: {
shortcut: "/favicon.png",
shortcut: "/favicon.jpg",
},
};
const inter = Inter({

View File

@ -25,9 +25,9 @@ export default async function ProjectsPage() {
return acc;
}, {} as Record<string, number>);
const featured = allProjects.find((project) => project.slug === "bimkaspace")!;
const featured = allProjects.find((project) => project.slug === "cbg")!;
const top2 = allProjects.find((project) => project.slug === "blog")!;
const top3 = allProjects.find((project) => project.slug === "nightdev")!;
const top3 = allProjects.find((project) => project.slug === "bimkaspace")!;
const sorted = allProjects
.filter((p) => p.published)
.filter(

View File

@ -1,76 +0,0 @@
---
title: "@chronark/access"
description: A minimal library for access control. It is designed to be used together with opaque access tokens by providing a simple interface to define roles with different access permissions and verifying requests to resources.
repository: chronark/access
date: "2022-11-13"
published: true
---
A minimal library for access control. It is designed to be used together with opaque access tokens by providing a simple interface to define roles with different access permissions and verifying requests to resources.
- Fully typed
- Zero dependencies
- Serializable to store in a database
## Install
```sh-session
npm i @chronark/access
```
## Usage
```ts
import { AccessControl, Role } from "@chronark/access";
/**
* Define all your resources and their access patterns
*
* key => resource
* value => array of access types
*/
type Statements = {
user: ["read", "write", "dance"];
team: ["read", "write"];
};
/**
* Create an access control instance and pass the Statements type to enjoy full
* type safety
*/
const ac = new AccessControl<Statements>();
/**
* Now you can define one or more roles by specifying the access permissions
*
* This is already fully typed and typescript will let you know if you try to
* use anything, that is not defined in the Statements type.
*/
const role = ac.newRole({
user: ["read", "write"],
team: ["read"],
});
/**
* Simulate storing and retrieving the role in a database
*
* The idea here is, that you can store permissions alongside an API token.
* Now, when you verify the token, you can also verify the access permissions.
*/
const serialized = role.toString();
/**
* Note how you can pass in the Statements type again, to get full type safety
*/
const recovered = Role.fromString<Statements>(serialized);
/**
* Validate the role by specifying the resource and the required access
*
* everything is fully typed
*/
const res = recovered.authorize({"team", ["read"]});
// res.success => boolean
// res.error => string | undefined provides a reason for failure
```

View File

@ -1,36 +1,23 @@
---
title: Bimka Space
description: QStash is a fully managed serverless queue and messaging service designed for the serverless era.
description: Блог и wiki про российский космос.
date: "2022-07-18"
url: https://upstash.com/qstash
url: https://bimka.space
published: true
---
QStash is an HTTP based messaging and scheduling solution for the serverless and edge runtimes.
Блог и wiki про российский космос.
- 100% serverless, no stateful connections required. Messages are pushed to your API.
- At-least-once delivery guaranteed to any public API
- Pubsub via topics
- Delay message delivery
- Message deduplication
- Scheduling via CRON
## Built with
### Frontend
- [Next.js](https://nextjs.org)
- [tailwindcss](https://tailwindcss.com)
Formally, QStash is a message queue and task scheduler designed for serverless runtimes. Informally, QStash is a glue for your serverless functions.
### Backend
- [Golang](https://go.dev)
- [Gin](https://gin-gonic.com/)
There was a perception serverless was only good for simple tasks. Not anymore. People build powerful systems with serverless stack. Powerful systems are composed of multiple components. Communication among those components is a big engineering problem. There are already great solutions for this problem. But we think existing solutions do not fit in serverless space. Either they are too complex or not designed to work with stateless runtimes. So we want a solution which (is):
- Works anywhere including serverless and edge.
- Messaging as a service with no backend for users to run.
- Lightweight, easy to understand, requires nothing to learn.
- Price scales to zero.
Let's talk about a real world example. We have an e-commerce app and we want to send an informational email after each purchase. We have a service (an API route) for new purchases (newPurchase) and a second service for sending emails and notifications (sendEmail). We can call the sendEmail service from the newPurchase service. But what if the call fails? Should we wait for the response and retry? What if too many calls congest the sendEmail service and the service does not respond on time? You need to handle all these cases in your newPurchase service. Moreover, when you change the contract of sendEmail service; you have to update your newPurchase service too.
If you use QStash in the above example, you simply send a request to QStash from the newPurchase service. QStash will queue the request and call the sendEmail service. If the service does not respond, QStash will retry with a backoff strategy. The latency of sendEmail service will not affect the newPurchase service, because it will not wait for a response from the sendEmail service. QStash decouples the newPurchase and sendEmail services. You can update both services independently as long as you keep the message format compatible.
With QStash, you can add delays to the requests. Send an email 3 days after the shipment to remind the customer to add a review. You can also schedule tasks. You can send the requests with a CRON expression, so it will be run repetitively.
To learn more about QStash, visit [upstash.com/qstash](upstash.com/qstash).
### DataBase
- PostgreSQL

View File

@ -1,36 +1,16 @@
---
title: blog.aderk.tech
description: QStash is a fully managed serverless queue and messaging service designed for the serverless era.
date: "2022-07-18"
url: https://upstash.com/qstash
title: Blog Aderk Tech
description: Blog with tech articles.
date: "2024-07-18"
url: https://blog.aderk.tech
published: true
---
QStash is an HTTP based messaging and scheduling solution for the serverless and edge runtimes.
Блог с техническими статьями по `Linux`, `Docker`, `K8s` и `DevOps`.
- 100% serverless, no stateful connections required. Messages are pushed to your API.
- At-least-once delivery guaranteed to any public API
- Pubsub via topics
- Delay message delivery
- Message deduplication
- Scheduling via CRON
## Built with
Formally, QStash is a message queue and task scheduler designed for serverless runtimes. Informally, QStash is a glue for your serverless functions.
There was a perception serverless was only good for simple tasks. Not anymore. People build powerful systems with serverless stack. Powerful systems are composed of multiple components. Communication among those components is a big engineering problem. There are already great solutions for this problem. But we think existing solutions do not fit in serverless space. Either they are too complex or not designed to work with stateless runtimes. So we want a solution which (is):
- Works anywhere including serverless and edge.
- Messaging as a service with no backend for users to run.
- Lightweight, easy to understand, requires nothing to learn.
- Price scales to zero.
Let's talk about a real world example. We have an e-commerce app and we want to send an informational email after each purchase. We have a service (an API route) for new purchases (newPurchase) and a second service for sending emails and notifications (sendEmail). We can call the sendEmail service from the newPurchase service. But what if the call fails? Should we wait for the response and retry? What if too many calls congest the sendEmail service and the service does not respond on time? You need to handle all these cases in your newPurchase service. Moreover, when you change the contract of sendEmail service; you have to update your newPurchase service too.
If you use QStash in the above example, you simply send a request to QStash from the newPurchase service. QStash will queue the request and call the sendEmail service. If the service does not respond, QStash will retry with a backoff strategy. The latency of sendEmail service will not affect the newPurchase service, because it will not wait for a response from the sendEmail service. QStash decouples the newPurchase and sendEmail services. You can update both services independently as long as you keep the message format compatible.
With QStash, you can add delays to the requests. Send an email 3 days after the shipment to remind the customer to add a review. You can also schedule tasks. You can send the requests with a CRON expression, so it will be run repetitively.
To learn more about QStash, visit [upstash.com/qstash](upstash.com/qstash).
- [Jekyll](https://jekyllrb.com/)
- [Chirpy Theme](https://github.com/cotes2020/jekyll-theme-chirpy)
- [Gitea Actions](https://docs.gitea.com/next/usage/actions/overview)

View File

@ -1,11 +0,0 @@
---
title: bitofgame.net
description: bitofgame.net is an open source API Key management solution. It allows you to create, manage and validate API Keys for your users.
date: "2025-07-01"
url: https://unkey.dev
published: true
repository: chronark/unkey
---
Unkey is an open source API Key management solution. It allows you to create, manage and validate API Keys for your users. Its built with security and speed in mind.

View File

@ -1,5 +1,5 @@
---
title: cloudberrygames
title: Cloudberry Games FUN
description: Веб-сайт с WebGL играми.
date: "2025-07-01"
url: https://cloudberrygames.fun

View File

@ -1,13 +0,0 @@
---
title: unkey.dev
description: Unkey is an open source API Key management solution. It allows you to create, manage and validate API Keys for your users. Its built with security and speed in mind.
date: "2023-07-01"
url: https://unkey.dev
published: true
repository: chronark/unkey
---
[![](https://unkey.dev/images/landing/app.png)](https://unkey.dev)
Unkey is an open source API Key management solution. It allows you to create, manage and validate API Keys for your users. Its built with security and speed in mind.

View File

@ -0,0 +1,25 @@
---
title: Gitea Instance
description: Gitea Aderk Tech - мой собственный git-сервер.
date: "2025-04-15"
url: https://gitea.aderk.tech
published: true
---
[Gitea](https://about.gitea.com/) — это легковесная, self-hosted платформа для управления Git-репозиториями с открытым исходным кодом.
Она предоставляет функционал, схожий с GitHub или GitLab, но ориентирована на простоту, минимализм и низкое потребление ресурсов.
## Функции
- **Хостинг кода:** Gitea позволяет создавать и управлять репозиториями на основе Git. Он также делает проверку кода невероятно простой и удобной, повышая качество кода для пользователей и предприятий.
- **CI/CD:** Gitea имеет интегрированную систему CI/CD, Gitea Actions, которая совместима с GitHub Actions. Пользователи могут создавать рабочие процессы, используя знакомый формат YAML, или использовать более 20 тыс. существующих плагинов.
- **Проекты:** Вы можете эффективно управлять требованиями, функциями и ошибками с помощью задач по проблемам, маркировки и досок kanban. Эти инструменты помогают планировать и отслеживать ход разработки, включая ветви, теги, этапы, задания, отслеживание времени и зависимости.
- **Пакеты:** Gitea поддерживает более 20 различных видов публичного и частного управления пакетами, включая: Cargo, Chef, Composer, Conan, Conda, Container, Helm, Maven, NPM, NuGet, Pub, PyPI, RubyGems, Vagrant и т. д.
![](https://github.com/chronark/envshare/raw/main/img/envshare.png)
### Почему я решил использовать Gitea, а не GitLab?
- Меньше потребляет ресурсы. А для меня это очень критично.
- Легче перенести проекты с GitHub.
- Проще в освоении.

View File

@ -1,26 +0,0 @@
---
title: highstorm.app
description: Simple, fast, open source custom event tracking
date: "2023-05-01"
url: https://highstorm.app
published: true
repository: "chronark/highstorm"
---
[![](https://highstorm.app/og.png)](https://highstorm.app)
Reduce the noise in your Slack workspace by consolidating all your event data into one place, filtering alerts by relevance, and customizing your alert settings to suit your needs.
###### Consolidate Events
Get all your event data in one place to reduce alert noise
###### Stay Focused
Keep your Slack workspace focused on what's important
###### Customizable Settings
Customize your alert settings to suit your unique needs
###### Clear Overview
Get a clear overview of all your alerts in one place

View File

@ -1,116 +1,24 @@
---
title: nightdevsocity.dev
description: EnvShare is a simple tool to share environment variables securely. It uses AES-GCM to encrypt your data before sending it to the server. The encryption key never leaves your browser.
date: "2023-01-16"
url: https://envshare.dev
repository: chronark/envshare
title: nightdevsociety.dev
description: Социальная сеть и дашбоард для начинающих ребят в it (Beta).
date: "2025-05-18"
url: https://nightdevsociety.dev
published: true
---
EnvShare is a simple tool to share environment variables securely. It uses
**AES-GCM** to encrypt your data before sending it to the server. The encryption
key never leaves your browser.
## Features
- **Shareable Links:** Share your environment variables securely by sending a
link
- **End-to-End Encryption:** AES-GCM encryption is used to encrypt your data
before sending it to the server
- **Limit number of reads:** Limit the number of times a link can be read
- **Auto Expire:** Automatically expire links and delete data after a certain
time
Социальная сеть, форум и git-хостинг для начинающих талантливых ребят в it (Beta).
Регистрация исключительно по приглашению.
![](https://github.com/chronark/envshare/raw/main/img/envshare.png)
## Built with
## Функции
- [Next.js](https://nextjs.org)
- [tailwindcss](https://tailwindcss.com)
- Deployed on [Vercel](https://vercel.com?utm_source=envshare)
- Data stored on [Upstash](https://upstash.com?utm_source=envshare)
- **Хостинг кода:** На git.nightdevsociety.dev - Хостинг Git-репозиториев, совместимый с GitHub и GitLab для удобства обсуждения кода или конфигов.
- **Проекты:** Вы можете эффективно управлять требованиями, функциями и ошибками с помощью задач по проблемам, маркировки и досок kanban. Эти инструменты помогают планировать и отслеживать ход разработки, включая ветви, теги, этапы, задания, отслеживание времени и зависимости.
- **Пакеты:** Gitea поддерживает более 20 различных видов публичного и частного управления пакетами, включая: Cargo, Chef, Composer, Conan, Conda, Container, Helm, Maven, NPM, NuGet, Pub, PyPI, RubyGems, Vagrant и т. д.
- **Форум:** На форуме можно обсуждать или/и начинать свои проекты.
## Deploy your own
Detailed instructions can be found [here](https://envshare.dev/deploy)
All you need is a Redis database on Upstash and a Vercel account. Click the
button below to clone and deploy:
[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?demo-title=EnvShare&demo-description=Simple%20Next.js%20%2B%20Upstash%20app%20to%20share%20environment%20variables%20securely%20using%20AES-GCM%20encryption.&demo-url=https%3A%2F%2Fenvshare.dev%2F&demo-image=%2F%2Fimages.ctfassets.net%2Fe5382hct74si%2F5SaFBHXp5FBFJbsTzVqIJ3%2Ff0f8382369b7642fd8103debb9025c11%2Fenvshare.png&project-name=EnvShare&repository-name=envshare&repository-url=https%3A%2F%2Fgithub.com%2Fchronark%2Fenvshare&from=templates&integration-ids=oac_V3R1GIpkoJorr6fqyiwdhl17)
## Configuration
### Environment Variables
`ENABLE_VERCEL_ANALYTICS` Any truthy value will enable Vercel Analytics. This is turned off by default
## Contributing
This repository uses `pnpm` to manage dependencies. Install it using
`npm install -g pnpm`
Please run `pnpm fmt` before committing to format the code.
## Docs
Docs in the README are temporary and will be moved to the website soon.
### API
#### Store a secret
**PLEASE NEVER EVER UPLOAD UNENCRYPTED SECRETS.**
This endpoint is only meant to store **already encrypted** secrets. The
encrypted secrets are stored in plain text.
```sh-session
$ curl -XPOST -s https://envshare.dev/api/v1/secret -d "already-encrypted-secret"
```
You can add optional headers to configure the ttl and number of reads.
```sh-session
$ curl -XPOST -s https://envshare.dev/api/v1/secret -d "already-encrypted-secret" -H "envshare-ttl: 3600" -H "envshare-reads: 10"
```
- Omitting the `envshare-ttl` header will set a default of 30 days. Disable the
ttl by setting it to 0. (`envshare-ttl: 0`)
- Omitting the `envshare-reads` header will simply disable it and allow reading
for an unlimited number of times.
This endpoint returns a JSON response with the secret id:
```json
{
"data": {
"id": "HdPbXgpvUvNk43oxSdK97u",
"ttl": 86400,
"reads": 2,
"expiresAt": "2023-01-19T20:47:28.383Z",
"url": "http://envshare.dev/api/v1/secret/HdPbXgpvUvNk43oxSdK97u"
}
}
```
#### Retrieve a secret
You need an id to retrieve a secret. The id is returned when you store a secret.
```sh-session
$ curl -s https://envshare.dev/api/v1/secret/HdPbXgpvUvNk43oxSdK97u
```
```json
{
"data": {
"secret": "Hello",
"remainingReads": 1
}
}
```
## Плюсы
- **Стараемся не душнить**: да, стараемся не душнить, чтобы новичкам было проще подключаться.
- **Удаляем hr'ов**: да, стараемся удалять hr'ов и не позволяем им залезть к нам.

View File

@ -1,15 +0,0 @@
---
title: planetfall.io
description: I'm building a SAAS providing global latency monitoring for your APIs and websites from edge locations around the world. Have you ever wondered how fast your API is in any part of the world? Planetfall allows you to find out and monitor it continuously.
date: "2023-04-01"
url: https://planetfall.io
published: true
---
[![](/planetfall.png)](https://planetfall.io)
Planetfall is a SaaS platform that provides global latency monitoring and synthetic monitoring for APIs. With over 60 regions to monitor from, customers can gain insights into the true performance of their API by checking latency from around the world.
Planetfall offers custom timeouts, threshold notifications, and real-time alerts for potential performance issues. Additionally, customers can create custom status pages to share with their customers, which can display availability and latency for every region. Planetfall offers a free tier that includes 100k checks per month and scales as customers grow. Overall, Planetfall helps customers stay in control of their API's performance, improve communication with their customers, and build trust.

View File

@ -0,0 +1,39 @@
---
title: Robot Fire
description: Robot Fire - это шутер от первого лица на Unity. Делал с целью поиграть с друзьями.
date: "2024-01-16"
repository: robotfireopenteam/robotfire
published: true
---
EnvShare is a simple tool to share environment variables securely. It uses
**AES-GCM** to encrypt your data before sending it to the server. The encryption
key never leaves your browser.
## Features
- **Shareable Links:** Share your environment variables securely by sending a
link
- **End-to-End Encryption:** AES-GCM encryption is used to encrypt your data
before sending it to the server
- **Limit number of reads:** Limit the number of times a link can be read
- **Auto Expire:** Automatically expire links and delete data after a certain
time
![](https://github.com/chronark/envshare/raw/main/img/envshare.png)
## Built with
### Frontend
- [Next.js](https://nextjs.org)
- [tailwindcss](https://tailwindcss.com)
### Backend
- [Golang](https://go.dev)
- [Gin](https://gin-gonic.com/)
### DataBase
- PostgreSQL

45
docker-compose.yml Normal file
View File

@ -0,0 +1,45 @@
services:
next:
build:
context: .
dockerfile: Dockerfile
container_name: example-frontend
labels:
- "traefik.enable=true"
- "traefik.http.routers.next.rule=Host(`beta.example`)"
- "traefik.http.routers.next.entrypoints=https" # Thats correct
- "traefik.http.routers.next.tls=true" # I dont need certresolver here
- "traefik.http.services.next.loadbalancer.server.port=3000"
environment:
- REDIS_HOST=redis
- REDIS_PORT=6379
- REDIS_PASSWORD=${REDIS_PASSWORD}
depends_on:
- redis
networks:
- proxy
- backend
redis:
image: redis:alpine
volumes:
- redis_data:/data
environment:
- REDIS_PASSWORD=${REDIS_PASSWORD}
command: ["redis-server", "--requirepass", "${REDIS_PASSWORD}"]
networks:
- backend
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 3s
retries: 3
volumes:
redis_data:
networks:
proxy:
external: true
backend:
internal: true

BIN
public/favicon.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB