Single instance with file storage Deployment
This deployment runs a single container that encapsulates all components, including the storage, within a single file.
Docker
Scrapoxy is hosted on Docker hub: scrapoxy/scrapoxy.
Volume
Start Scrapoxy with a volume for the configuration file:
docker run -d -p 8888:8888 -p 8890:8890 \
-e AUTH_LOCAL_USERNAME=admin -e AUTH_LOCAL_PASSWORD=password \
-e BACKEND_JWT_SECRET=secret1 -e FRONTEND_JWT_SECRET=secret2 \
-e STORAGE_FILE_FILENAME=/etc/scrapoxy/config.json \
-v ./scrapoxy:/etc/scrapoxy \
scrapoxy/scrapoxy
INFO
The file ./scrapoxy/config.json
contains the configuration on the host machine.
Production mode
To limit the log level, set the environment variable NODE_ENV
to production
:
docker run -d -p 8888:8888 -p 8890:8890 \
-e AUTH_LOCAL_USERNAME=admin -e AUTH_LOCAL_PASSWORD=password \
-e BACKEND_JWT_SECRET=secret1 -e FRONTEND_JWT_SECRET=secret2 \
-e NODE_ENV=production \
scrapoxy/scrapoxy
Docker Compose
Edit docker-compose.yml
with the following content:
version: '3'
services:
scrapoxy:
image: scrapoxy/scrapoxy
ports:
- 8888:8888
- 8890:8890
environment:
- NODE_ENV=production
- AUTH_LOCAL_USERNAME=admin
- AUTH_LOCAL_PASSWORD=password
- BACKEND_JWT_SECRET=secret1
- FRONTEND_JWT_SECRET=secret2
- STORAGE_FILE_FILENAME=/etc/scrapoxy/config.json
volumes:
- ./scrapoxy:/etc/scrapoxy
Run the following command:
docker compose up -d
Kubernetes with Helm
Create an umbrella chart with Helm with the following files structure:
myscrapoxy/
|- Chart.yaml
|- values.yaml
Edit Chart.yaml
with the following content:
apiVersion: v2
name: scrapoxy
description: Scrapoxy Single Instance
type: application
version: 1.0.0
appVersion: latest
dependencies:
- name: scrapoxy
version: 1.0.0
repository: https://charts.scrapoxy.io
Edit values.yaml
with the following content:
scrapoxy:
auth:
local:
username: "admin"
password: "password"
backendJwtSecret: "secret1"
frontendJwtSecret: "secret2"
Build dependencies:
helm dependency build ./myscrapoxy
Install the chart:
helm install scrapoxy ./myscrapoxy