-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
72 lines (59 loc) · 2.56 KB
/
.env.example
File metadata and controls
72 lines (59 loc) · 2.56 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
# Database Configuration
DATABASE_URL=postgresql://username:password@localhost/texture_provider
# JWT Configuration (ES256 public key in PEM format)
JWT_PUBLIC_KEY=BASE64_ECDSA_LAUNCHSERVER_KEY
# Admin Token (required for /api/upload/:type endpoint)
# This token is used to authenticate admin operations
# Generate a secure random token for production use
ADMIN_TOKEN=your-secret-admin-token-here
# Base URL for generating texture URLs
BASE_URL=http://localhost:3000
# Storage Configuration
# Options: local, s3
STORAGE_TYPE=local
# Texture Retrieval Configuration
# Options: storage, mojang, default_skin
# storage: Retrieve from local/S3 storage (default)
# mojang: Fetch textures from Mojang's official API
# default_skin: Return default Steve skin for all users
RETRIEVAL_TYPE=storage
# Texture Retrieval Chain (optional)
# Comma-separated list of retrieval types to try in order
# The first handler to successfully return a texture will be used
# Example: RETRIEVAL_CHAIN=storage,mojang,default_skin
# This would try:
# 1. First, try to get the texture from storage (database + local/S3)
# 2. If not found, try to fetch from Mojang's API
# 3. If still not found, return the default Steve skin
# Note: If RETRIEVAL_CHAIN is set, RETRIEVAL_TYPE is ignored
#RETRIEVAL_CHAIN=storage,mojang,default_skin
# Local Storage (required if STORAGE_TYPE=local)
LOCAL_STORAGE_PATH=./uploads
# S3 Storage (required if STORAGE_TYPE=s3)
S3_BUCKET=your-bucket-name
S3_REGION=us-east-1
S3_ENDPOINT=https://s3.amazonaws.com
S3_ACCESS_KEY=your-access-key
S3_SECRET_KEY=your-secret-key
# Server Configuration
SERVER_PORT=3000
# Username-based Endpoint Cache Configuration
# Cache lifetime in seconds for the /download/username/:texture_type/:username endpoint
# Default is 28800 seconds (8 hours)
# This should be relatively short since username<->uuid mappings are unreliable
USERNAME_CACHE_SECONDS=28800
# Hash-based Endpoint Cache Configuration
# Cache lifetime in seconds for the /download/:hash endpoint
# Default is 1209600 seconds (14 days)
# This can be longer since texture hashes don't change
HASH_CACHE_SECONDS=1209600
# CORS Configuration
# Comma-separated list of allowed origins for CORS
# Use "*" to allow all origins (NOT recommended for production)
# Example: CORS_ALLOWED_ORIGINS=https://example.com,https://app.example.com
# If not set, defaults to allowing all origins (development mode)
CORS_ALLOWED_ORIGINS=*
# Use Database Username in Mojang Requests
# If true, attempts to look up username from database and resolve via Mojang API
# Default is true
USE_DATABASE_USERNAME_IN_MOJANG_REQUESTS=true