FROM docker.hub.ipao.vip/jrottenberg/ffmpeg:4.4-alpine

# Set timezone
RUN apk add --no-cache tzdata && \
    cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime && \
    echo "Asia/Shanghai" > /etc/timezone && \
    apk del tzdata && \
    mkdir -p /app/downloads /app/dist

COPY backend/build/app /app/app
COPY backend/config.prod.toml /app/config.toml
COPY frontend/admin/dist /app/dist/admin
COPY frontend/wechat/dist /app/dist/wechat

WORKDIR /app

ENTRYPOINT  ["/app/app"]

EXPOSE 9888

VOLUME ["/app/downloads"]

CMD [ "serve" ]
