mirror of
https://github.com/DrizzleTime/Foxel.git
synced 2026-07-10 23:12:01 +08:00
Initial commit
This commit is contained in:
45
Dockerfile
Normal file
45
Dockerfile
Normal file
@@ -0,0 +1,45 @@
|
||||
FROM oven/bun:1.2-slim AS frontend-builder
|
||||
|
||||
WORKDIR /app/web
|
||||
|
||||
COPY web/package.json web/bun.lock ./
|
||||
RUN bun install --frozen-lockfile
|
||||
|
||||
COPY web/ ./
|
||||
|
||||
RUN bun run build
|
||||
|
||||
FROM python:3.14-slim
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN apt-get update \
|
||||
&& apt-get install -y --no-install-recommends ffmpeg curl ca-certificates \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
RUN pip install uv
|
||||
COPY pyproject.toml uv.lock ./
|
||||
RUN uv pip install --system . gunicorn \
|
||||
&& rm -rf /root/.cache
|
||||
|
||||
RUN curl -L https://github.com/DrizzleTime/FoxelUpgrade/archive/refs/heads/main.tar.gz -o /tmp/migrate.tgz \
|
||||
&& mkdir -p /app/migrate \
|
||||
&& tar -xzf /tmp/migrate.tgz --strip-components=1 -C /app/migrate \
|
||||
&& rm -rf /tmp/migrate.tgz
|
||||
|
||||
COPY --from=frontend-builder /app/web/dist /app/web/dist
|
||||
|
||||
COPY . .
|
||||
|
||||
RUN mkdir -p data/db data/mount && \
|
||||
chmod 777 data/db data/mount && \
|
||||
chmod +x setup/foxel_cli.py && \
|
||||
ln -sf /app/setup/foxel_cli.py /usr/local/bin/foxel && \
|
||||
rm -rf /var/log/apt /var/cache/apt/archives
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
COPY entrypoint.sh /entrypoint.sh
|
||||
RUN chmod +x /entrypoint.sh
|
||||
|
||||
CMD ["/entrypoint.sh"]
|
||||
Reference in New Issue
Block a user