Use watch mode for transcoder

This commit is contained in:
2025-05-19 14:10:35 +02:00
parent 4828fa08cf
commit af566150f5
4 changed files with 18 additions and 6 deletions
+5 -1
View File
@@ -15,10 +15,14 @@ x-transcoder: &transcoder-base
environment:
- GOCODER_PREFIX=/video
volumes:
- ./transcoder:/app
- ${LIBRARY_ROOT}:/video:ro
- ${CACHE_ROOT}:/cache
- transcoder_metadata:/metadata
develop:
watch:
- action: sync+restart
path: ./transcoder
target: /app
services:
# front:
+7 -1
View File
@@ -1 +1,7 @@
target/
**
!/go.mod
!/go.sum
!/**.go
!/migrations
# genereated via swag
!/docs
+3 -1
View File
@@ -24,11 +24,13 @@ RUN apt-get update \
ffmpeg libavformat-dev libavutil-dev libswscale-dev \
&& apt-get clean autoclean -y \
&& apt-get autoremove -y
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN go build -o ./transcoder
RUN GOOS=linux go build -o ./transcoder
# debian is required for nvidia hardware acceleration
# we use trixie (debian's testing because ffmpeg on latest is v5 and we need v6)
+3 -3
View File
@@ -22,8 +22,6 @@ RUN set -eux; \
ENV SSL_CERT_DIR=/etc/ssl/certs
RUN update-ca-certificates
RUN go install github.com/bokwoon95/wgo@latest
# read target arch from buildx or default to amd64 if using legacy builder.
ARG TARGETARCH
ENV TARGETARCH=${TARGETARCH:-amd64}
@@ -51,5 +49,7 @@ ENV NVIDIA_DRIVER_CAPABILITIES="all"
COPY go.mod go.sum ./
RUN go mod download
COPY . .
EXPOSE 7666
CMD ["wgo", "run", "-race", "."]
CMD ["go", "run", "-race", "."]