diff --git a/.env.example b/.env.example index eaeef99..a67d5dd 100644 --- a/.env.example +++ b/.env.example @@ -1,6 +1,7 @@ STREAM_URL=http://example.com/stream -CHECK_INTERVAL=60 -RECORD_DIRECTORY=/records -CONNECT_TIMEOUT=10 -FIRST_BYTE_TIMEOUT=30 -WEB_SERVER_PORT=8080 +CHECK_INTERVAL=1m +RECORDINGS_PATH=/records +TEMP_PATH=./temp +SERVER_ADDRESS=:8080 +RSS_FEED_URL=http://localhost:8080/rss +LOG_LEVEL=info diff --git a/.pylintrc b/.pylintrc deleted file mode 100644 index 7717528..0000000 --- a/.pylintrc +++ /dev/null @@ -1,2 +0,0 @@ -[MESSAGES CONTROL] -disable=line-too-long diff --git a/Dockerfile b/Dockerfile index 1e16b91..9d2117f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -29,18 +29,17 @@ COPY --from=builder /icecast-ripper /app/icecast-ripper # These should ideally be mounted as volumes in production RUN mkdir -p /app/recordings /app/temp -# Expose the server port (if different from default, adjust accordingly) +# Expose the server port EXPOSE 8080 # Set default environment variables (can be overridden) -ENV DATABASE_PATH=/app/icecast-ripper.db ENV RECORDINGS_PATH=/app/recordings ENV TEMP_PATH=/app/temp ENV SERVER_ADDRESS=:8080 ENV LOG_LEVEL=info +ENV CHECK_INTERVAL=1m +ENV RSS_FEED_URL=http://localhost:8080/rss # ENV STREAM_URL= # Required: Must be set at runtime -# ENV CHECK_INTERVAL=1m # Optional: Defaults to 1m -# ENV RSS_FEED_URL= # Optional: Defaults to http://:8080/rss # Command to run the application ENTRYPOINT ["/app/icecast-ripper"] diff --git a/docker-compose.yml b/docker-compose.yml index 3346b33..a2a25ad 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -7,10 +7,13 @@ services: - "8080:8080" environment: - STREAM_URL=http://example.com/stream - - CHECK_INTERVAL=60 - - OUTPUT_DIRECTORY=/records - - CONNECT_TIMEOUT=10 - - FIRST_BYTE_TIMEOUT=30 - - WEB_SERVER_PORT=8080 + - CHECK_INTERVAL=1m + - RECORDINGS_PATH=/records + - TEMP_PATH=/app/temp + - SERVER_ADDRESS=:8080 + - RSS_FEED_URL=http://localhost:8080/rss + - LOG_LEVEL=info volumes: - ./records:/records + - ./temp:/app/temp + - ./data:/app/data diff --git a/internal/config/config.go b/internal/config/config.go index eba2fc4..2c8f8a7 100644 --- a/internal/config/config.go +++ b/internal/config/config.go @@ -12,7 +12,6 @@ type Config struct { CheckInterval time.Duration `mapstructure:"CHECK_INTERVAL"` RecordingsPath string `mapstructure:"RECORDINGS_PATH"` TempPath string `mapstructure:"TEMP_PATH"` - DatabasePath string `mapstructure:"DATABASE_PATH"` ServerAddress string `mapstructure:"SERVER_ADDRESS"` RSSFeedURL string `mapstructure:"RSS_FEED_URL"` LogLevel string `mapstructure:"LOG_LEVEL"` @@ -29,7 +28,6 @@ func LoadConfig() (*Config, error) { "CHECK_INTERVAL": "1m", "RECORDINGS_PATH": "./recordings", "TEMP_PATH": "./temp", - "DATABASE_PATH": "./icecast-ripper.db", "SERVER_ADDRESS": ":8080", "RSS_FEED_URL": "http://localhost:8080/rss", "LOG_LEVEL": "info",