-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.dev
More file actions
50 lines (42 loc) · 1.18 KB
/
Dockerfile.dev
File metadata and controls
50 lines (42 loc) · 1.18 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# syntax=docker/dockerfile:1.7
FROM rust:alpine
# Install build, runtime, and development dependencies in a single stage
RUN apk add --no-cache \
build-base \
musl-dev \
zstd-dev \
openssl-dev \
pkgconfig \
ca-certificates \
curl \
unzip \
tini \
gcompat \
python3 \
libgcc \
libstdc++ \
aria2 \
ffmpeg \
bash \
git
# Setup Python venv and install yt-dlp
RUN python3 -m venv /opt/yt && \
/opt/yt/bin/pip install --no-cache-dir --upgrade pip yt-dlp
# Set up the application directory
WORKDIR /app
# Ensure runtime directories exist
RUN mkdir -p /home/app/downloads
# Environment Configuration for Development
ENV YTDLP_PATH=/opt/yt/bin/yt-dlp \
YTDLP_EXTERNAL_DOWNLOADER=aria2c \
YTDLP_EXTERNAL_DOWNLOADER_ARGS="aria2c:-x16 -j16 -s16 -k1M --file-allocation=none --summary-interval=0" \
DOWNLOAD_DIR=/home/app/downloads \
APP_HOST=0.0.0.0 \
APP_PORT=8080 \
APP_ENV=development \
RUST_LOG=debug
EXPOSE 8080
# Mount your source code to /app via docker-compose or docker run:
# docker run -v .:/app -p 8080:8080 my-dev-image
ENTRYPOINT ["/sbin/tini", "-g", "--"]
CMD ["cargo", "run", "--bin", "nadzu"]