Improve directory architecture

This commit is contained in:
2025-08-10 10:53:25 -07:00
parent 3a15c43d1b
commit f57f67191c
4 changed files with 8 additions and 4 deletions

View File

@@ -24,7 +24,9 @@ RUN useradd -m bot
USER bot
# Create directories for persistent storage and modify permissions
RUN mkdir -p /app/logs && chown -R bot:bot /app && chmod -R 777 /app/logs
RUN chown -R bot:bot /app
RUN mkdir -p /app/logs && chmod -R 777 /app/logs
RUN mkdir -p /app/embed && chmod -R 777 /app/embed
# Set environment variables for configuration
ENV PYTHONUNBUFFERED=1

View File

@@ -1,10 +1,10 @@
{
"401095ca": {
"channel_id": "1392730642206429307",
"message_id": "1404111932625260566"
"message_id": "1404158812084109423"
},
"548c4f18": {
"channel_id": "1392730682576343121",
"message_id": "1404111938975432725"
"message_id": "1404158818476097656"
}
}

View File

@@ -1,6 +1,7 @@
import os
import configparser
from pathlib import Path
from dotenv import load_dotenv
def validate_env_vars():
"""Validate that required environment variables are set and non-empty."""
@@ -45,4 +46,5 @@ def generate_config():
print(f"Config file generated at {config_path}")
if __name__ == "__main__":
load_dotenv()
generate_config()

View File

@@ -143,7 +143,7 @@ try:
ALLOWED_GUILD_ID = config.getint('Discord', 'AllowedGuildID')
REQUIRED_ROLE = "Game Server User"
UPDATE_INTERVAL = 10
EMBED_LOCATIONS_FILE = "embed_locations.json"
EMBED_LOCATIONS_FILE = "./embed/embed_locations.json"
logger.debug("Loaded and validated configuration values from config.ini")