File tree Expand file tree Collapse file tree 2 files changed +14
-3
lines changed
Expand file tree Collapse file tree 2 files changed +14
-3
lines changed Original file line number Diff line number Diff line change 7575 name : pyrom-config
7676 key : PYROM_LOG_LEVEL
7777 optional : true
78+ # Point to persistent storage directories
79+ - name : PYROM_PLAYER_DIR
80+ value : " /pyrom-persistent/players"
81+ - name : PYROM_WORLD_DIR
82+ value : " /pyrom-persistent/world"
83+ - name : PYROM_SYSTEM_DIR
84+ value : " /pyrom-persistent/system"
7885 ports :
7986 - containerPort : 1337
8087 name : telnet
Original file line number Diff line number Diff line change 3838logger .info ("HELP_DIR: %s" , HELP_DIR )
3939
4040# New structure
41+ # Support environment variables for persistent storage in containers
4142USER_DIR = os .path .expanduser ("~" )
4243BASE_DIR = os .path .join (USER_DIR , "rom24" )
4344DATA_DIR = os .path .join (SOURCE_DIR , "data" )
44- WORLD_DIR = os .path .join (DATA_DIR , "world" )
45- PLAYER_DIR = os .path .join (DATA_DIR , "players" )
46- SYSTEM_DIR = os .path .join (DATA_DIR , "system" )
45+
46+ # Use environment variables for persistent directories if available
47+ WORLD_DIR = os .environ .get ("PYROM_WORLD_DIR" , os .path .join (DATA_DIR , "world" ))
48+ PLAYER_DIR = os .environ .get ("PYROM_PLAYER_DIR" , os .path .join (DATA_DIR , "players" ))
49+ SYSTEM_DIR = os .environ .get ("PYROM_SYSTEM_DIR" , os .path .join (DATA_DIR , "system" ))
50+
4751DOC_DIR = os .path .join (DATA_DIR , "docs" )
4852AREA_DIR = LEGACY_AREA_DIR
4953AREA_LIST_FILE = os .path .join (AREA_DIR , AREA_LIST )
You can’t perform that action at this time.
0 commit comments