diff --git a/.gitpod.yml b/.gitpod.yml deleted file mode 100644 index 7abfa1ab131..00000000000 --- a/.gitpod.yml +++ /dev/null @@ -1,38 +0,0 @@ -ports: -- name: Web App - port: 8080 -# ignore these ports by default to avoid extra notifications -- name: Solr - port: 8983 - onOpen: ignore -- name: Covers - port: 7075 - onOpen: ignore -- name: Infobase - port: 7000 - onOpen: ignore -- name: Debugger - port: 3000 - onOpen: ignore -tasks: -- name: watch - # This task watches for changes to JS/CSS files and automatically builds - init: gp sync-await docker-up && docker compose run --rm home npm run watch -- name: Start App - before: | - # run chown because https://github.com/gitpod-io/gitpod/issues/4851 - sudo chown -R gitpod:999 $GITPOD_REPO_ROOT - # Give container (ie group) write access to this volume - sudo chmod g+w -R $GITPOD_REPO_ROOT - # because: https://github.com/gitpod-io/gitpod/issues/9311 - chmod o+rx $GITPOD_REPO_ROOT - # init runs once for each commit to the default branch - init: docker compose up --no-start && gp sync-done docker-up - # command runs each time a user starts their workspace - command: | - export OL_COVERSTORE_PUBLIC_URL="https://7075-${GITPOD_WORKSPACE_ID}.${GITPOD_WORKSPACE_CLUSTER_HOST}" - docker compose up -- name: dev shell - # init runs once for each commit to the default branch - init: ./scripts/setup_gitpod.sh - openMode: split-right diff --git a/Readme.md b/Readme.md index f8ef1a6dc54..b62c42bd808 100644 --- a/Readme.md +++ b/Readme.md @@ -5,7 +5,6 @@ ![Python Build](https://github.com/internetarchive/openlibrary/actions/workflows/python_tests.yml/badge.svg) ![JS Build](https://github.com/internetarchive/openlibrary/actions/workflows/javascript_tests.yml/badge.svg) [![Join the chat at https://gitter.im/theopenlibrary/Lobby](https://badges.gitter.im/theopenlibrary/Lobby.svg)](https://gitter.im/theopenlibrary/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) -[![Open in Gitpod](https://img.shields.io/badge/Contribute%20with-Gitpod-908a85?logo=gitpod)](https://gitpod.io/#https://github.com/internetarchive/openlibrary/) [![contributors](https://img.shields.io/github/contributors/internetarchive/openlibrary.svg)](https://github.com/internetarchive/openlibrary/graphs/contributors) [Open Library](https://openlibrary.org) is an open, editable library catalog, building towards a web page for every book ever published. @@ -45,10 +44,6 @@ Run `docker compose up` and visit http://localhost:8080 Need more details? Checkout the [Docker instructions](https://github.com/internetarchive/openlibrary/blob/master/docker/README.md) or [video tutorial](https://archive.org/embed/openlibrary-developer-docs/openlibrary-docker-set-up.mp4). -***Alternatively***, if you do not want to set up Open Library on your local computer, try Gitpod! -This lets you work on Open Library entirely in your browser without having to install anything on your personal computer. -Warning: This integration is still experimental. -[![Open In Gitpod](https://img.shields.io/badge/Contribute%20with-Gitpod-908a85?logo=gitpod)](https://gitpod.io/#https://github.com/internetarchive/openlibrary/) ### Developer's Guide diff --git a/Readme_chinese.md b/Readme_chinese.md index ccce0827b95..05f8369ba28 100644 --- a/Readme_chinese.md +++ b/Readme_chinese.md @@ -42,9 +42,6 @@ 需要更多信息?请查看 [Docker指南](https://github.com/internetarchive/openlibrary/blob/master/docker/README.md) 或者[视频教程](https://archive.org/embed/openlibrary-developer-docs/openlibrary-docker-set-up.mp4)。 -***或者***,如果您不想在本地的电脑上安装公共图书馆,您可以尝试Gitpod!这可以让您在不安装任何插件的前提下,在浏览器中使用公共图书馆。警告:此集成仍在实验中。 -[![Open In Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/internetarchive/openlibrary/) - ### 给开发者的指南 有关管理公共图书馆实例的说明,请参考开发者的[快速入门](https://github.com/internetarchive/openlibrary/wiki/Getting-Started)指南。 diff --git a/Readme_es.md b/Readme_es.md index fed23b7b966..a1f7dd0e570 100644 --- a/Readme_es.md +++ b/Readme_es.md @@ -43,11 +43,6 @@ Ejecuta `docker compose up` y visita http://localhost:8080 ¿Necesitas más detalles? Checa las [Instrucciones de Docker](https://github.com/internetarchive/openlibrary/blob/master/docker/README.md) o el [video tutorial](https://archive.org/embed/openlibrary-developer-docs/openlibrary-docker-set-up.mp4). -***Alternativamente***, Si no quieres montar Open Library en tu computadora local, prueba Gitpod! -Esto te deja trabajar en Open Library enteramente desde tu navegador sin tener que instalar nada en tu computadora personal. -Advertencia: Esta integración sigue siendo experimental. -[![Ábrelo en Gitpod](https://img.shields.io/badge/Contribute%20with-Gitpod-908a85?logo=gitpod)](https://gitpod.io/#https://github.com/internetarchive/openlibrary/) - ### Guía de Desarrollador También puedes encontrar más información sobre la Documentación para Desarrolladores de Open Library en la [Wiki](https://github.com/internetarchive/openlibrary/wiki/) de Open Library. diff --git a/Readme_vn.md b/Readme_vn.md index 215632f9c49..4933190456a 100644 --- a/Readme_vn.md +++ b/Readme_vn.md @@ -42,10 +42,6 @@ Chạy `docker compose up` và truy cập http://localhost:8080 Cần thêm chi tiết? Xem thử [Docker instructions](https://github.com/internetarchive/openlibrary/blob/master/docker/README.md) hoặc [video hướng dẫn](https://archive.org/embed/openlibrary-developer-docs/openlibrary-docker-set-up.mp4). -***Ngoài ra***, nếu bạn không muốn thiết lập Open Library trên máy tính cá nhân của mình, hãy thử sử dụng Gitpod! Điều này cho phép bạn làm việc với Open Library hoàn toàn trong trình duyệt mà không cần cài đặt bất kỳ thứ gì trên máy tính cá nhân. -Cảnh báo: Việc tích hợp này vẫn đang trong giai đoạn thử nghiệm. -[![Open In Gitpod](https://img.shields.io/badge/Contribute%20with-Gitpod-908a85?logo=gitpod)](https://gitpod.io/#https://github.com/internetarchive/openlibrary/) - ### Hướng dẫn dành cho nhà phát triển Bạn cũng có thể tìm kiếm thêm thông tin về Tài liệu dành cho nhà phát triển của Open Library trong chính Open Library [Wiki](https://github.com/internetarchive/openlibrary/wiki/). diff --git a/docker/README.md b/docker/README.md index d1d585eb09f..9071bc4c318 100644 --- a/docker/README.md +++ b/docker/README.md @@ -1,8 +1,5 @@ # Welcome to the Installation Guide for Open Library Developers -> [!TIP] -> Want to try Open Library in your browser without having to install anything on your personal computer? Try (experimental) Gitpod integration! [![Open In Gitpod](https://img.shields.io/badge/Contribute%20with-Gitpod-908a85?logo=gitpod)](https://gitpod.io/#https://github.com/internetarchive/openlibrary/) - 1. [Pull code locally](#pull-code-locally) 2. [Install Docker](#install-docker) and [Test Docker](#test-docker) 3. [Prepare your system](#prepare-your-system) diff --git a/openlibrary/plugins/openlibrary/js/service-worker-matchers.js b/openlibrary/plugins/openlibrary/js/service-worker-matchers.js index 435a8454a70..672e6fa4c5a 100644 --- a/openlibrary/plugins/openlibrary/js/service-worker-matchers.js +++ b/openlibrary/plugins/openlibrary/js/service-worker-matchers.js @@ -31,8 +31,7 @@ export function matchStaticImages({ url }) { export function matchStaticBuild({ url }) { const regex = /^\/static\/build\/.*(\.js|\.css)/; const localhost = url.origin.includes('localhost') - const gitpod = url.origin.includes('gitpod') - return !localhost && !gitpod && regex.test(url.pathname); + return !localhost && regex.test(url.pathname); } export function matchArchiveOrgImage({ url }) { diff --git a/openlibrary/plugins/upstream/code.py b/openlibrary/plugins/upstream/code.py index e840eb47b3c..2a07fc2e148 100644 --- a/openlibrary/plugins/upstream/code.py +++ b/openlibrary/plugins/upstream/code.py @@ -47,7 +47,7 @@ # Note: This is done in web_nginx.conf on production ; this endpoint is -# only used in development/gitpod. +# only used in development environments. class static(delegate.page): path = "/images/.*" diff --git a/scripts/setup_gitpod.sh b/scripts/setup_gitpod.sh deleted file mode 100755 index d0adc5f68b1..00000000000 --- a/scripts/setup_gitpod.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash -# This script does the setup needed for Gitpod - -# Setup pre-commit hooks -pyenv install 3.12 --skip-existing # must match python version in .pre-commit-config.yaml -pyenv global 3.12 -sudo python3 -m pip install pre-commit -pre-commit install --install-hooks diff --git a/tests/unit/js/service-worker-matchers.test.js b/tests/unit/js/service-worker-matchers.test.js index f3ffdba9e2d..93765655ce3 100644 --- a/tests/unit/js/service-worker-matchers.test.js +++ b/tests/unit/js/service-worker-matchers.test.js @@ -61,9 +61,8 @@ describe('URL Matchers', () => { expect(matchStaticBuild(_u('https://testing.openlibrary.org/static/build/css/page-book.css?v=097b69dc350c972d96da0c70cebe7b75'))).toBe(true); }); - test('does not match localhost or gitpod URLs', () => { + test('does not match localhost URLs', () => { expect(matchStaticBuild(_u('http://localhost:8080/static/build/js/4290.a0ae80aacde14696d322.js'))).toBe(false); - expect(matchStaticBuild(_u('https://8080-internetarc-openlibrary-feliyig0grl.ws-eu110.gitpod.io/static/build/js/4290.a0ae80aacde14696d322.js'))).toBe(false); }); }); diff --git a/vue.config.js b/vue.config.js index 2c18120be0f..c7db816a370 100644 --- a/vue.config.js +++ b/vue.config.js @@ -1,24 +1,5 @@ /* eslint-env node, es6 */ module.exports = { lintOnSave: false, - publicPath: '/static/components/', - - // Add support for running from gitpod - ...(process.env.GITPOD_WORKSPACE_ID ? { - devServer: { - allowedHosts: [ - // It'll pick the first free one, so will be 8080 if OL not running, otherwise 8081. - // The rest are just in case/if you run multiple - `8080-${process.env.GITPOD_WORKSPACE_ID}.${process.env.GITPOD_WORKSPACE_CLUSTER_HOST}`, - `8081-${process.env.GITPOD_WORKSPACE_ID}.${process.env.GITPOD_WORKSPACE_CLUSTER_HOST}`, - `8082-${process.env.GITPOD_WORKSPACE_ID}.${process.env.GITPOD_WORKSPACE_CLUSTER_HOST}`, - `8083-${process.env.GITPOD_WORKSPACE_ID}.${process.env.GITPOD_WORKSPACE_CLUSTER_HOST}`, - ], - client: { - webSocketURL: { - port: 443, - }, - }, - }, - } : {}), + publicPath: '/static/components/' };