From 2cfa5acb359983205fc3047787bfbfcf71ac86b2 Mon Sep 17 00:00:00 2001 From: Christopher Dixon Date: Tue, 27 Feb 2024 14:38:48 -0500 Subject: [PATCH 1/4] update Dockerfile & add compose.yaml file --- Dockerfile | 28 ++++++++++++++++++++++++++++ compose.yaml | 27 +++++++++++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 compose.yaml diff --git a/Dockerfile b/Dockerfile index 5923db79..c19be899 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,8 +9,36 @@ COPY pnpm-lock.yaml ./ RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile ARG PWA_ENABLED="false" +ARG GA_ID="" +ARG APP_DOMAIN="" +ARG OPENSEARCH_ENABLED="false" +ARG TMDB_READ_API_KEY="" +ARG CORS_PROXY_URL="" +ARG DMCA_EMAIL="" +ARG NORMAL_ROUTER="false" +ARG BACKEND_URL="" +ARG HAS_ONBOARDING="false" +ARG ONBOARDING_CHROME_EXTENSION_INSTALL_LINK="" +ARG ONBOARDING_PROXY_INSTALL_LINK="" +ARG DISALLOWED_IDS="" +ARG CDN_REPLACEMENTS="" +ARG TURNSTILE_KEY="" ENV VITE_PWA_ENABLED=${PWA_ENABLED} +ENV VITE_GA_ID=${GA_ID} +ENV VITE_APP_DOMAIN=${APP_DOMAIN} +ENV VITE_OPENSEARCH_ENABLED=${OPENSEARCH_ENABLED} +ENV VITE_TMDB_READ_API_KEY=${TMDB_READ_API_KEY} +ENV VITE_CORS_PROXY_URL=${CORS_PROXY_URL} +ENV VITE_DMCA_EMAIL=${DMCA_EMAIL} +ENV VITE_NORMAL_ROUTER=${NORMAL_ROUTER} +ENV VITE_BACKEND_URL=${BACKEND_URL} +ENV VITE_HAS_ONBOARDING=${HAS_ONBOARDING} +ENV VITE_ONBOARDING_CHROME_EXTENSION_INSTALL_LINK=${ONBOARDING_CHROME_EXTENSION_INSTALL_LINK} +ENV VITE_ONBOARDING_PROXY_INSTALL_LINK=${ONBOARDING_PROXY_INSTALL_LINK} +ENV VITE_DISALLOWED_IDS=${DISALLOWED_IDS} +ENV VITE_CDN_REPLACEMENTS=${CDN_REPLACEMENTS} +ENV VITE_TURNSTILE_KEY=${TURNSTILE_KEY} COPY . ./ RUN pnpm run build diff --git a/compose.yaml b/compose.yaml new file mode 100644 index 00000000..dde02c87 --- /dev/null +++ b/compose.yaml @@ -0,0 +1,27 @@ +version: "3.8" + +services: + + movieweb: + image: ghcr.io/movie-web/movie-web:latest + ports: + - "3000:80" + restart: always + environment: + VITE_CORS_PROXY_URL: ${VITE_CORS_PROXY_URL} + VITE_TMDB_READ_API_KEY: ${VITE_TMDB_READ_API_KEY} + VITE_PWA_ENABLED: ${PWA_ENABLED} + VITE_GA_ID: ${GA_ID} + VITE_APP_DOMAIN: ${APP_DOMAIN} + VITE_OPENSEARCH_ENABLED: ${OPENSEARCH_ENABLED} + VITE_TMDB_READ_API_KEY: ${TMDB_READ_API_KEY} + VITE_CORS_PROXY_URL: ${CORS_PROXY_URL} + VITE_DMCA_EMAIL: ${DMCA_EMAIL} + VITE_NORMAL_ROUTER: ${NORMAL_ROUTER} + VITE_BACKEND_URL: ${BACKEND_URL} + VITE_HAS_ONBOARDING: ${HAS_ONBOARDING} + VITE_ONBOARDING_CHROME_EXTENSION_INSTALL_LINK: ${ONBOARDING_CHROME_EXTENSION_INSTALL_LINK} + VITE_ONBOARDING_PROXY_INSTALL_LINK: ${ONBOARDING_PROXY_INSTALL_LINK} + VITE_DISALLOWED_IDS: ${DISALLOWED_IDS} + VITE_CDN_REPLACEMENTS: ${CDN_REPLACEMENTS} + VITE_TURNSTILE_KEY: ${TURNSTILE_KEY} \ No newline at end of file From d92a4de948cc158e3ea58391a8b338a8c6b07fe0 Mon Sep 17 00:00:00 2001 From: Christopher Dixon Date: Tue, 27 Feb 2024 14:55:05 -0500 Subject: [PATCH 2/4] peer review feedback --- Dockerfile | 22 +++++++++++----------- compose.yaml | 27 --------------------------- docker-compose.yaml | 10 ++++++++++ 3 files changed, 21 insertions(+), 38 deletions(-) delete mode 100644 compose.yaml create mode 100644 docker-compose.yaml diff --git a/Dockerfile b/Dockerfile index c19be899..12b13f98 100644 --- a/Dockerfile +++ b/Dockerfile @@ -9,20 +9,20 @@ COPY pnpm-lock.yaml ./ RUN --mount=type=cache,id=pnpm,target=/pnpm/store pnpm install --frozen-lockfile ARG PWA_ENABLED="false" -ARG GA_ID="" -ARG APP_DOMAIN="" +ARG GA_ID +ARG APP_DOMAIN ARG OPENSEARCH_ENABLED="false" -ARG TMDB_READ_API_KEY="" -ARG CORS_PROXY_URL="" -ARG DMCA_EMAIL="" +ARG TMDB_READ_API_KEY +ARG CORS_PROXY_URL +ARG DMCA_EMAIL ARG NORMAL_ROUTER="false" -ARG BACKEND_URL="" +ARG BACKEND_URL ARG HAS_ONBOARDING="false" -ARG ONBOARDING_CHROME_EXTENSION_INSTALL_LINK="" -ARG ONBOARDING_PROXY_INSTALL_LINK="" -ARG DISALLOWED_IDS="" -ARG CDN_REPLACEMENTS="" -ARG TURNSTILE_KEY="" +ARG ONBOARDING_CHROME_EXTENSION_INSTALL_LINK +ARG ONBOARDING_PROXY_INSTALL_LINK +ARG DISALLOWED_IDS +ARG CDN_REPLACEMENTS +ARG TURNSTILE_KEY ENV VITE_PWA_ENABLED=${PWA_ENABLED} ENV VITE_GA_ID=${GA_ID} diff --git a/compose.yaml b/compose.yaml deleted file mode 100644 index dde02c87..00000000 --- a/compose.yaml +++ /dev/null @@ -1,27 +0,0 @@ -version: "3.8" - -services: - - movieweb: - image: ghcr.io/movie-web/movie-web:latest - ports: - - "3000:80" - restart: always - environment: - VITE_CORS_PROXY_URL: ${VITE_CORS_PROXY_URL} - VITE_TMDB_READ_API_KEY: ${VITE_TMDB_READ_API_KEY} - VITE_PWA_ENABLED: ${PWA_ENABLED} - VITE_GA_ID: ${GA_ID} - VITE_APP_DOMAIN: ${APP_DOMAIN} - VITE_OPENSEARCH_ENABLED: ${OPENSEARCH_ENABLED} - VITE_TMDB_READ_API_KEY: ${TMDB_READ_API_KEY} - VITE_CORS_PROXY_URL: ${CORS_PROXY_URL} - VITE_DMCA_EMAIL: ${DMCA_EMAIL} - VITE_NORMAL_ROUTER: ${NORMAL_ROUTER} - VITE_BACKEND_URL: ${BACKEND_URL} - VITE_HAS_ONBOARDING: ${HAS_ONBOARDING} - VITE_ONBOARDING_CHROME_EXTENSION_INSTALL_LINK: ${ONBOARDING_CHROME_EXTENSION_INSTALL_LINK} - VITE_ONBOARDING_PROXY_INSTALL_LINK: ${ONBOARDING_PROXY_INSTALL_LINK} - VITE_DISALLOWED_IDS: ${DISALLOWED_IDS} - VITE_CDN_REPLACEMENTS: ${CDN_REPLACEMENTS} - VITE_TURNSTILE_KEY: ${TURNSTILE_KEY} \ No newline at end of file diff --git a/docker-compose.yaml b/docker-compose.yaml new file mode 100644 index 00000000..070f5fba --- /dev/null +++ b/docker-compose.yaml @@ -0,0 +1,10 @@ +version: "3.8" + +services: + + movieweb: + build: + context: . + ports: + - "80:80" + restart: always From 916d15d2f05c57500f1540eebbfe6b1984c26523 Mon Sep 17 00:00:00 2001 From: Christopher Dixon Date: Tue, 27 Feb 2024 15:02:45 -0500 Subject: [PATCH 3/4] add commented out build args to docker-compose.yaml --- docker-compose.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/docker-compose.yaml b/docker-compose.yaml index 070f5fba..85f7f7f9 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -5,6 +5,22 @@ services: movieweb: build: context: . + # args: + # PWA_ENABLED: "false" + # GA_ID: "" + # APP_DOMAIN: "" + # OPENSEARCH_ENABLED: "false" + # TMDB_READ_API_KEY: "" + # CORS_PROXY_URL: "" + # DMCA_EMAIL: "" + # NORMAL_ROUTER: "false" + # BACKEND_URL: "" + # HAS_ONBOARDING: "false" + # ONBOARDING_CHROME_EXTENSION_INSTALL_LINK: "" + # ONBOARDING_PROXY_INSTALL_LINK: "" + # DISALLOWED_IDS: "" + # CDN_REPLACEMENTS: "" + # TURNSTILE_KEY: "" ports: - "80:80" restart: always From 7b1330f664caffe03b1b8042d41bf34b12d1c987 Mon Sep 17 00:00:00 2001 From: Audiosutras <37882933+Audiosutras@users.noreply.github.com> Date: Tue, 27 Feb 2024 15:05:22 -0500 Subject: [PATCH 4/4] Update docker-compose.yaml Co-authored-by: Timon Klinkert <83671398+DenuxPlays@users.noreply.github.com> --- docker-compose.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-compose.yaml b/docker-compose.yaml index 85f7f7f9..c3745fdd 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -23,4 +23,4 @@ services: # TURNSTILE_KEY: "" ports: - "80:80" - restart: always + restart: unless-stopped