suno-api/Dockerfile
gohoski 7da7ac6ae2 Implement hCaptcha solving via 2Captcha & other stuff
- implement hCaptcha solving via paid service 2Captcha and browser automation library Playwright with rebrowser-patches

- implement sunoApi instances caching so sessions won't be constantly updated

- add support for entering cookies not only in SUNO_COOKIE, but also the Cookie HTTP header

- update docs and add Russian docs
2025-01-06 05:25:08 +03:00

26 lines
618 B
Docker

# syntax=docker/dockerfile:1
FROM node:lts-alpine AS builder
WORKDIR /src
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
FROM node:lts-alpine
WORKDIR /app
COPY package*.json ./
ARG SUNO_COOKIE
ARG BROWSER
RUN if [ -z "$SUNO_COOKIE" ]; then echo "Warning: SUNO_COOKIE is not set"; fi
ENV SUNO_COOKIE=${SUNO_COOKIE}
RUN if [ -z "$BROWSER" ]; then echo "Warning: BROWSER is not set; will use chromium by default"; fi
ENV BROWSER=${BROWSER:-chromium}
RUN npm install --only=production
RUN npx playwright install $BROWSER
COPY --from=builder /src/.next ./.next
EXPOSE 3000
CMD ["npm", "run", "start"]