This commit is contained in:
2026-03-09 06:16:36 +01:00
parent ef54906d9a
commit 40dacc0b62
52 changed files with 1922 additions and 143 deletions
+16
View File
@@ -0,0 +1,16 @@
FROM node:lts-trixie
RUN apt update && apt install -y ca-certificates curl zip unzip wget rsync openssh-client zlib1g
RUN update-ca-certificates
WORKDIR /app
RUN curl -fsSL https://bun.sh/install | bash
ENV PATH="/root/.bun/bin:${PATH}"
COPY ./entrypoint.sh /usr/local/bin/entrypoint.sh
RUN chmod +x /usr/local/bin/entrypoint.sh
ENTRYPOINT ["entrypoint.sh"]
+14
View File
@@ -0,0 +1,14 @@
#!/bin/bash
cd /app
if [[ -z "$NODE_ENV" ]]; then
echo "NODE_ENV is not set. Defaulting to development."
NODE_ENV="development"
fi
if [[ "$NODE_ENV" == "production" ]]; then
bun src/cron/index.ts
else
bun --watch src/cron/index.ts
fi
+30
View File
@@ -0,0 +1,30 @@
server {
listen 80;
server_name _;
client_max_body_size 20M;
location /ws {
proxy_pass http://localhost:3773;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $host;
proxy_read_timeout 3600s;
proxy_send_timeout 3600s;
proxy_connect_timeout 60s;
proxy_buffering off;
keepalive_timeout 75s;
tcp_nodelay on;
}
location / {
proxy_pass http://localhost:3772;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header Host $host;
}
}
+33
View File
@@ -0,0 +1,33 @@
user nginx;
worker_processes auto;
error_log /var/log/nginx/error.log notice;
pid /run/nginx.pid;
events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
sendfile on;
#tcp_nopush on;
keepalive_timeout 65;
limit_req_zone $binary_remote_addr zone=api_limit:10m rate=10r/s;
#gzip on;
include /etc/nginx/conf.d/*.conf;
}
+16
View File
@@ -0,0 +1,16 @@
FROM node:lts-trixie
RUN apt update && apt install -y ca-certificates curl zip unzip wget rsync openssh-client zlib1g wget
RUN update-ca-certificates
RUN mkdir /app
WORKDIR /app
RUN curl -fsSL https://bun.sh/install | bash
ENV PATH="/root/.bun/bin:${PATH}"
COPY ./entrypoint.sh /usr/local/bin/entrypoint.sh
RUN chmod +x /usr/local/bin/entrypoint.sh
ENTRYPOINT ["entrypoint.sh"]
+17
View File
@@ -0,0 +1,17 @@
#!/bin/bash
cd /app
rm -rf /app/node_modules
rm -rf /app/.next
bun install
npm rebuild better-sqlite3
if [ $NODE_ENV = "production" ]; then
echo "Production Environment"
bun next start -p ${PORT}
else
echo "Development Environment"
bun next dev -p ${PORT}
fi
+6
View File
@@ -0,0 +1,6 @@
FROM oven/bun:debian
COPY ./entrypoint.sh /usr/local/bin/entrypoint.sh
RUN chmod +x /usr/local/bin/entrypoint.sh
ENTRYPOINT ["entrypoint.sh"]
+14
View File
@@ -0,0 +1,14 @@
#!/bin/bash
cd /app
if [[ -z "$NODE_ENV" ]]; then
echo "NODE_ENV is not set. Defaulting to development."
NODE_ENV="development"
fi
if [[ "$NODE_ENV" == "production" ]]; then
bun src/websocket/index.ts
else
bun --watch src/websocket/index.ts
fi