forked from FlareSolverr/FlareSolverr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
68 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.git/ | ||
.github/ | ||
.idea/ | ||
html_samples/ | ||
resources/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
FROM python:3.10.5-slim-bullseye | ||
|
||
WORKDIR /app | ||
|
||
# Install dependencies and create user | ||
# We have to install and old version of Chromium because its not working in Raspberry Pi / ARM | ||
# You can test Chromium running this command inside the container: | ||
# xvfb-run -s "-screen 0 1600x1200x24" chromium --no-sandbox | ||
# The error traces is like this: "*** stack smashing detected ***: terminated" | ||
# To check the package versions available you can use this command: | ||
# apt-cache madison chromium | ||
RUN echo "\ndeb http://snapshot.debian.org/archive/debian/20210519T212015Z/ bullseye main" >> /etc/apt/sources.list \ | ||
&& echo 'Acquire::Check-Valid-Until "false";' | tee /etc/apt/apt.conf.d/00snapshot \ | ||
&& apt-get update \ | ||
&& apt-get install -y --no-install-recommends chromium=89.0.4389.114-1 chromium-common=89.0.4389.114-1 \ | ||
chromium-driver=89.0.4389.114-1 xvfb xauth \ | ||
# Clean | ||
&& rm -rf /var/lib/apt/lists/* \ | ||
# Create user | ||
&& useradd --home-dir /app --shell /bin/sh flaresolverr \ | ||
&& mv /usr/bin/chromedriver chromedriver \ | ||
&& chown -R flaresolverr:flaresolverr . | ||
|
||
# Install Python dependencies | ||
COPY requirements.txt . | ||
RUN pip install -r requirements.txt \ | ||
# remove temporary files | ||
&& rm -rf /root/.cache \ | ||
&& find / -name '*.pyc' -delete | ||
|
||
USER flaresolverr | ||
|
||
COPY src . | ||
COPY docker/entrypoint.sh . | ||
COPY package.json ../ | ||
|
||
EXPOSE 8191 | ||
|
||
CMD ["/bin/sh", "/app/entrypoint.sh"] | ||
|
||
# docker build -t flaresolverr:3.0.0.beta1 . | ||
# docker run -p 8191:8191 flaresolverr:3.0.0.beta1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
--- | ||
version: "2.1" | ||
services: | ||
flaresolverr: | ||
# DockerHub mirror flaresolverr/flaresolverr:latest | ||
image: ghcr.io/flaresolverr/flaresolverr:latest | ||
container_name: flaresolverr | ||
environment: | ||
- LOG_LEVEL=${LOG_LEVEL:-info} | ||
- LOG_HTML=${LOG_HTML:-false} | ||
- CAPTCHA_SOLVER=${CAPTCHA_SOLVER:-none} | ||
- TZ=Europe/London | ||
ports: | ||
- "${PORT:-8191}:8191" | ||
restart: unless-stopped |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
#!/bin/sh - | ||
|
||
export DISPLAY=99 | ||
#echo "Listening on :$DISPLAY" | ||
|
||
xvfb-run -s "-screen 0 1920x1080x24" python -u /app/flaresolverr.py |