-
Notifications
You must be signed in to change notification settings - Fork 99
Expand file tree
/
Copy pathdocker-compose.yml
More file actions
executable file
·51 lines (45 loc) · 2.58 KB
/
docker-compose.yml
File metadata and controls
executable file
·51 lines (45 loc) · 2.58 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
version: "3.8" # Recommended to use a recent version for new features
services:
#latest
of-scraper:
stdin_open: true # Keeps STDIN open for interactive processes
tty: true # Allocates a pseudo-TTY for a terminal-like interface
container_name: ofscraper
environment: # Optional environment variables
# These are recommended for correct file permissions on mounted volumes.
# Default UID/GID is 1000:1000 if not specified via environment variables in your shell.
# - USER_NAME=ofscraper # Defaults to 'ofscraper' in the entrypoint script
# - USER_ID=${USER_ID} # Host user's UID (e.g., set via 'export USER_ID=$(id -u)' on host)
# - GROUP_ID=${GROUP_ID} # Host user's GID (e.g., set via 'export GROUP_ID=$(id -g)' on host)
# - GROUP_NAME=mygroup # Optional: If you want a custom group name different from USER_NAME
volumes:
# Mount your configuration directory (replace ./config/ with your host path)
- ./config/:/home/ofscraper/.config/ofscraper/
# Mount your data storage directory (replace ./data/ with your host path)
- ./data/:/home/ofscraper/data/
# Optional: Mount pre-installed binaries from host (adjust paths as needed)
# - /usr/bin/ffmpeg:/usr/bin/ffmpeg
image: ghcr.io/datawhores/of-scraper:main
# --- COMMAND OPTIONS ---
# Choose one of the following 'command' configurations based on your use case.
# Uncomment the desired option and ensure others are commented out.
# Option 1: For interactive use (recommended if you frequently run commands manually)
# This keeps the container running indefinitely in the background.
command: ["/bin/bash", "-c", "sleep infinity"]
# To bring the container up: `docker compose up -d`
# Then, to run commands inside it: `docker compose exec -it ofscraper ofscraper {args}`
# Example: `docker compose exec -it ofscraper ofscraper --username myuser`
# Option 2: To run the scraper automatically with specific arguments when the container starts
# Uncomment the line below and comment out Option 1 above.
# command: "ofscraper --username ALL --posts all"
# Optional: Configure restart policy.
# restart: "unless-stopped" # Ensures the container restarts automatically unless explicitly stopped.
#local
#comment out this and comment out the first of-scraper example to run locally
# of-scraper:
# stdin_open: true # Keeps STDIN open for interactive processes
# tty: true # Allocates a pseudo-TTY for a terminal-like interface
# container_name: ofscraper
# build:
# context: .
# dockerfile: Dockerfile