Initial backend repository commit.

Set up project files and add .gitignore to exclude local build/runtime artifacts.

Made-with: Cursor
This commit is contained in:
2026-03-09 21:28:58 +08:00
commit 4d8f2ec997
102 changed files with 25022 additions and 0 deletions

28
Dockerfile Normal file
View File

@@ -0,0 +1,28 @@
# 使用Debian bookworm-slim作为生产镜像
FROM debian:bookworm-slim
# 安装必要的运行时依赖
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
tzdata \
libsqlite3-0 \
&& rm -rf /var/lib/apt/lists/* \
&& apt-get clean
# 设置工作目录
WORKDIR /app
# 从宿主机复制编译好的二进制文件
COPY server ./carrot_bbs
# 复制配置文件
COPY configs ./configs
# 给可执行文件添加执行权限
RUN chmod +x ./carrot_bbs
# 暴露端口
EXPOSE 8080
# 默认命令
CMD ["./carrot_bbs"]