From 5e09b0436d125cdb664768e8a93379fa20984c5b Mon Sep 17 00:00:00 2001 From: b2cc Date: Tue, 15 Oct 2024 17:13:38 +0200 Subject: [PATCH] Add Dockerfile for Phanpy Created a Dockerfile to quickly build/run Phanpy --- Dockerfile | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 00000000..5e2a42ef --- /dev/null +++ b/Dockerfile @@ -0,0 +1,21 @@ +# syntax=docker/dockerfile:1.9 + +FROM docker.io/node:22-alpine as BUILD +ENV \ + PHANPY_CLIENT_NAME="Phanpy" \ + PHANPY_WEBSITE="https://phanpy.social" \ + PHANPY_DEFAULT_INSTANCE="mastodon.social" \ + PHANPY_DEFAULT_INSTANCE_REGISTRATION_URL="https://mastodon.social/auth/sign_up" \ + PHANPY_PRIVACY_POLICY_URL="https://mastodon.social/about" \ + PHANPY_DEFAULT_LANG="en" \ + PHANPY_LINGVA_INSTANCES="lingva.phanpy.social" \ + PHANPY_IMG_ALT_API_URL="" \ + PHANPY_GIPHY_API_KEY="" +WORKDIR /build +COPY package.json package-lock.json ./ +RUN npm install +COPY ./ ./ +RUN npm run build + +FROM docker.io/bitnami/nginx:1.27 +COPY --from=BUILD /build/dist/ /app