2024-09-15 00:33:02 +08:00
|
|
|
FROM alpine
|
|
|
|
|
|
|
|
ENV RUN_MODE=prod
|
|
|
|
|
2024-09-19 11:58:32 +08:00
|
|
|
# 安装 tzdata 包
|
|
|
|
RUN apk add --no-cache tzdata
|
|
|
|
|
|
|
|
# 设置时区环境变量,例如设置为 Asia/Shanghai
|
|
|
|
ENV TZ=Asia/Shanghai
|
|
|
|
|
|
|
|
# 复制时区信息到系统时区目录
|
|
|
|
RUN cp /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
|
|
|
|
|
2024-10-31 15:12:26 +08:00
|
|
|
WORKDIR /rtsa
|
|
|
|
COPY ./target/x86_64-unknown-linux-musl/release/manager ./rtsa_m
|
2024-10-31 15:56:01 +08:00
|
|
|
COPY ./manager/conf/* ./conf/
|
2024-09-15 00:33:02 +08:00
|
|
|
COPY ./migrations/* ./migrations/
|
|
|
|
|
|
|
|
EXPOSE 8765
|
|
|
|
|
2024-10-31 15:12:26 +08:00
|
|
|
CMD ["sh", "-c", "./rtsa_m db migrate && ./rtsa_m serve"]
|