diff --git a/.gitpod.Dockerfile b/.gitpod.Dockerfile new file mode 100644 index 0000000..7fc972c --- /dev/null +++ b/.gitpod.Dockerfile @@ -0,0 +1,9 @@ +FROM gitpod/workspace-full-vnc + +# https://www.gitpod.io/blog/native-ui-with-vnc +RUN sudo apt-get update && \ + sudo apt-get install -y libx11-dev libxkbfile-dev libsecret-1-dev libnss3 && \ + sudo rm -rf /var/lib/apt/lists/* + +# Install Playwright dependencies +RUN npx -y playwright install --with-deps diff --git a/.gitpod.yml b/.gitpod.yml new file mode 100644 index 0000000..e389ad4 --- /dev/null +++ b/.gitpod.yml @@ -0,0 +1,13 @@ +image: + file: .gitpod.Dockerfile + +ports: + - port: 6080 + +tasks: + - init: | + virtualenv -p $(which python3) pyenv + command: | + source pyenv/bin/activate + pip install -r requirements.txt + python server.py diff --git a/README.md b/README.md index 9c9e12d..33f8128 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,11 @@ * It uses playwright and chromium to open browser and parse html. * It is an unoffical api for development purpose only. +## Run in Gitpod + +Instead of setting up locally, you can click on Gitpod button and get it working in your browser: + +[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/from-referrer/) # How to install