feat: decouple frontend and backend deployment workflows with Docker
This commit is contained in:
15
server/Dockerfile
Normal file
15
server/Dockerfile
Normal file
@@ -0,0 +1,15 @@
|
||||
FROM alpine:latest
|
||||
|
||||
# 安装证书 (HTTPS请求需要) 和时区数据
|
||||
RUN apk --no-cache add ca-certificates tzdata
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
# 拷贝由 CI 提前编译好的二进制文件
|
||||
# 这里假设 CI 已经将编译产物命名为 server_bin
|
||||
COPY server_bin .
|
||||
RUN chmod +x server_bin
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
CMD ["./server_bin"]
|
||||
Reference in New Issue
Block a user