Browserless / Railway deployment
aurelius0180
PROOP

2 years ago

Hello

I will try again. The other thread was deleted after a couple of days, so I didn't have the chance to reply.

This time I am including build and deploy logs. Thank you.

Perhaps someone could show me how to deploy a minimal working example of an async scraper using the Browserless / Playwright template in Railway?

Thank you so much for your help.Build logs:[Region: europe-west4]

Jul 04 15:06:19

==============

Jul 04 15:06:19

Using Nixpacks

Jul 04 15:06:19

==============

Jul 04 15:06:19

Jul 04 15:06:19

context: b4b1b5f983ef73ede946290c28c9c89f

Jul 04 15:06:19

Jul 04 15:06:19

╔══════════════════════════════ Nixpacks v1.24.1 ══════════════════════════════╗

Jul 04 15:06:19

║ setup │ python3, gcc ║

Jul 04 15:06:19

║──────────────────────────────────────────────────────────────────────────────║

Jul 04 15:06:19

║ install │ python -m venv --copies /opt/venv && . /opt/venv/bin/activate ║

Jul 04 15:06:19

║ │ && pip install -r requirements.txt ║

Jul 04 15:06:19

║──────────────────────────────────────────────────────────────────────────────║

Jul 04 15:06:19

║ build │ pip install -r requirements.txt ║

Jul 04 15:06:19

║──────────────────────────────────────────────────────────────────────────────║

Jul 04 15:06:19

║ start │ hypercorn webserver:app --bind 0.0.0.0:$PORT ║

Jul 04 15:06:19

╚══════════════════════════════════════════════════════════════════════════════╝

Jul 04 15:06:19

Jul 04 15:06:19

Jul 04 15:06:19

#0 building with "default" instance using docker driver

Jul 04 15:06:19

Jul 04 15:06:19

#1 [internal] load build definition from Dockerfile

Jul 04 15:06:19

Jul 04 15:06:19

#1 transferring dockerfile: 3.42kB done

Jul 04 15:06:19

#1 DONE 0.0s

Jul 04 15:06:19

Jul 04 15:06:19

#2 [internal] load metadata for ghcr.io/railwayapp/nixpacks:ubuntu-1716249803

Jul 04 15:06:19

Jul 04 15:06:19

#2 DONE 0.3s

Jul 04 15:06:19

Jul 04 15:06:19

Jul 04 15:06:19

#3 [internal] load .dockerignore

Jul 04 15:06:19

Jul 04 15:06:19

#3 transferring context: 2B done

Jul 04 15:06:19

#3 DONE 0.0s

Jul 04 15:06:19

Jul 04 15:06:19

#4 [stage-0 1/10] FROM ghcr.io/railwayapp/nixpacks:ubuntu-1716249803@sha256:5ef4d2021c418fcaabb56cea5ea9e24a5fdedfe27f58062d9689214dfed45c46

Jul 04 15:06:19

#4 DONE 0.0s

Jul 04 15:06:19

Jul 04 15:06:19

#5 [internal] load build context

Jul 04 15:06:19

#5 transferring context: 4.37MB 0.0s done

Jul 04 15:06:19

#5 DONE 0.1s

Jul 04 15:06:19

Jul 04 15:06:19

#6 [stage-0 2/10] WORKDIR /app/

Jul 04 15:06:19

#6 CACHED

Jul 04 15:06:19

Jul 04 15:06:19

#7 [stage-0 3/10] COPY .nixpacks/nixpkgs-bf446f08bff6814b569265bef8374cfdd3d8f0e0.nix .nixpacks/nixpkgs-bf446f08bff6814b569265bef8374cfdd3d8f0e0.nix

Jul 04 15:06:19

#7 CACHED

Jul 04 15:06:19

Jul 04 15:06:19

#8 [stage-0 4/10] RUN nix-env -if .nixpacks/nixpkgs-bf446f08bff6814b569265bef8374cfdd3d8f0e0.nix && nix-collect-garbage -d

Jul 04 15:06:19

#8 CACHED

Jul 04 15:06:19

Jul 04 15:06:19

#9 [stage-0 5/10] COPY . /app/.

Jul 04 15:06:19

#9 DONE 0.0s

Jul 04 15:06:19

Jul 04 15:06:19

Jul 04 15:06:19

#10 [stage-0 6/10] RUN --mount=type=cache,id=s/458abdf6-d728-403b-89a6-9d0f29a08b79-/root/cache/pip,target=/root/.cache/pip python -m venv --copies /opt/venv && . /opt/venv/bin/activate && pip install -r requirements.txt

Jul 04 15:06:19

Jul 04 15:06:24

#10 4.496 Collecting APScheduler==3.10.3 (from -r requirements.txt (line 1))

Jul 04 15:06:24

Jul 04 15:06:24

#10 4.639 Downloading APScheduler-3.10.3-py3-none-any.whl.metadata (5.7 kB)

Jul 04 15:06:24

Jul 04 15:06:24

#10 4.845 Collecting cryptography==41.0.3 (from -r requirements.txt (line 2))

Jul 04 15:06:24

Jul 04 15:06:24

#10 4.852 Downloading cryptography-41.0.3-cp37-abi3-manylinux_2_28_x86_64.whl.metadata (5.2 kB)

Jul 04 15:06:24

#10 4.872 Collecting itsdangerous==2.1.2 (from -r requirements.txt (line 3))

Jul 04 15:06:24

#10 4.879 Downloading itsdangerous-2.1.2-py3-none-any.whl.metadata (2.9 kB)

Jul 04 15:06:24

#10 4.911 Collecting quart==0.19.6 (from -r requirements.txt (line 4))

14 Replies

aurelius0180
PROOP

2 years ago

I am unable to leave a comment with the deploy log.


2 years ago

Please use this to download your logs and then attach them - https://bookmarklets.up.railway.app/log-downloader/


aurelius0180
PROOP

2 years ago

There is no deployment log.


2 years ago

I would not be able to help without logs, sorry.


aurelius0180
PROOP

2 years ago

That is very understandable. It says "deployment failed during the build proces". I dont think it ever gets to deployment.This is the build log.

Attachments


2 years ago

Thanks for the logs.

Looks like you are trying to install glibc as a python package? can you attach your requirements.txt file please.


aurelius0180
PROOP

2 years ago

Attached.Basically I am just trying to start a Playwright instance with Browserless. Do you have a working instance I can try to deploy, and then I can make my way from there?

Attachments



aurelius0180
PROOP

2 years ago

Thank you for the link. That is what I am trying to run. It is adapted from code that already runs on Railway (sync).


2 years ago

Can you try using the same runtime.txt file that I have in my example repo?


aurelius0180
PROOP

2 years ago

Now I added the runtime.txt with 3.11. Now it deploys.When I call the async scraper I get this.

Attachments


2 years ago

Are you sure you are using the correct environment variables as shown by the example repo?


aurelius0180
PROOP

2 years ago

I am using this endpoint: BROWSER_PLAYWRIGHT_ENDPOINTwith a variable that looks like this: "wss://browserless-production-f10a.up.railway.app/playwright?token=abcde_fghji_kjlmn-opqrst...."


2 years ago

Does it work locally?


Loading...