Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Dockerfile #139

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ RUN wget https://github.com/yt-dlp/yt-dlp/releases/latest/download/yt-dlp -O /us
RUN chmod a+rx /usr/local/bin/yt-dlp

# Backend setup
FROM devopsworks/golang-upx:latest as backend-builder
FROM devopsworks/golang-upx:1.23 AS backend-builder

ENV DEBIAN_FRONTEND noninteractive
ENV DEBIAN_FRONTEND=noninteractive
WORKDIR /app
COPY ./backend /app
RUN go mod tidy
Expand All @@ -18,7 +18,7 @@ RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o whishper . && \
RUN chmod a+rx whishper

# Frontend setup
FROM node:alpine as frontend
FROM node:alpine AS frontend
ENV PNPM_HOME="/pnpm"
ENV PATH="$PNPM_HOME:$PATH"
RUN corepack enable
Expand All @@ -34,7 +34,7 @@ ENV BODY_SIZE_LIMIT=0
RUN pnpm run build

# Base container
FROM python:3.11-slim as base
FROM python:3.11-slim AS base

RUN export DEBIAN_FRONTEND=noninteractive \
&& apt-get -qq update \
Expand All @@ -47,6 +47,7 @@ COPY ./transcription-api /app/transcription
WORKDIR /app/transcription
RUN pip3 install -r requirements.txt
RUN pip3 install python-multipart
RUN pip3 install torch torchaudio --extra-index-url https://download.pytorch.org/whl/cpu

# Node.js service setup
ENV BODY_SIZE_LIMIT=0
Expand All @@ -73,4 +74,4 @@ COPY ./supervisord.conf /etc/supervisor/conf.d/supervisord.conf
ENTRYPOINT ["supervisord", "-c", "/etc/supervisor/conf.d/supervisord.conf"]

# Expose ports for each service and Nginx
EXPOSE 8080 3000 5000 80
EXPOSE 8080 3000 5000 80