blob: 5c6f34acb2854e750e15678410e7f71f9c5eccc8 (
plain)
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
|
#!/usr/bin/env bash
set -euo pipefail
export GPG_TTY=$(tty)
function get_or_gen_secret() {
local path=$1
local generate=${2:-false}
local description=$3
if ! gopass show "$path" >/dev/null 2>&1; then
if [ "$generate" = "true" ]; then
local val=$(openssl rand -hex 32)
gopass insert -f "$path" <<< "$val"
else
echo >&2 "$description"
echo >&2 "Enter value (leave empty to skip):"
read -r val
gopass insert -f "$path" <<< "$val"
fi
fi
gopass show -o "$path"
}
TEST_API_KEY=$(get_or_gen_secret "projects/firecrawl-dokploy/prod/api_key" true "Firecrawl API Key")
BULL_AUTH_KEY=$(get_or_gen_secret "projects/firecrawl-dokploy/prod/bull_auth_key" true "Bull Auth Key")
POSTGRES_PASSWORD=$(get_or_gen_secret "projects/firecrawl-dokploy/prod/postgres_password" true "PostgreSQL Password")
SEARXNG_SECRET_KEY=$(get_or_gen_secret "projects/firecrawl-dokploy/prod/searxng_secret_key" true "SearXNG Secret Key")
# FIRECRAWL_DOMAIN is only needed if you use Traefik routing (not required for direct IP access).
FIRECRAWL_DOMAIN=$(gopass show -o "projects/firecrawl-dokploy/prod/firecrawl_domain" 2>/dev/null || echo "")
# OPENAI_API_KEY is only needed for /extract features. Add it directly in Dokploy if needed.
OPENAI_API_KEY=$(gopass show -o "projects/firecrawl-dokploy/prod/openai_api_key" 2>/dev/null || echo "")
cat <<EOF
TEST_API_KEY=$TEST_API_KEY
BULL_AUTH_KEY=$BULL_AUTH_KEY
POSTGRES_PASSWORD=$POSTGRES_PASSWORD
SEARXNG_SECRET=$SEARXNG_SECRET_KEY
EOF
if [ -n "$FIRECRAWL_DOMAIN" ]; then
echo "FIRECRAWL_DOMAIN=$FIRECRAWL_DOMAIN"
fi
if [ -n "$OPENAI_API_KEY" ]; then
echo "OPENAI_API_KEY=$OPENAI_API_KEY"
fi
|