removed DATABASE_PATH

This commit is contained in:
Dmitrii Andreev
2025-04-07 13:27:12 +03:00
parent 574b75fc97
commit 15c6f7b137
5 changed files with 17 additions and 18 deletions

View File

@@ -1,6 +1,7 @@
STREAM_URL=http://example.com/stream STREAM_URL=http://example.com/stream
CHECK_INTERVAL=60 CHECK_INTERVAL=1m
RECORD_DIRECTORY=/records RECORDINGS_PATH=/records
CONNECT_TIMEOUT=10 TEMP_PATH=./temp
FIRST_BYTE_TIMEOUT=30 SERVER_ADDRESS=:8080
WEB_SERVER_PORT=8080 RSS_FEED_URL=http://localhost:8080/rss
LOG_LEVEL=info

View File

@@ -1,2 +0,0 @@
[MESSAGES CONTROL]
disable=line-too-long

View File

@@ -29,18 +29,17 @@ COPY --from=builder /icecast-ripper /app/icecast-ripper
# These should ideally be mounted as volumes in production # These should ideally be mounted as volumes in production
RUN mkdir -p /app/recordings /app/temp RUN mkdir -p /app/recordings /app/temp
# Expose the server port (if different from default, adjust accordingly) # Expose the server port
EXPOSE 8080 EXPOSE 8080
# Set default environment variables (can be overridden) # Set default environment variables (can be overridden)
ENV DATABASE_PATH=/app/icecast-ripper.db
ENV RECORDINGS_PATH=/app/recordings ENV RECORDINGS_PATH=/app/recordings
ENV TEMP_PATH=/app/temp ENV TEMP_PATH=/app/temp
ENV SERVER_ADDRESS=:8080 ENV SERVER_ADDRESS=:8080
ENV LOG_LEVEL=info 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 STREAM_URL= # Required: Must be set at runtime
# ENV CHECK_INTERVAL=1m # Optional: Defaults to 1m
# ENV RSS_FEED_URL= # Optional: Defaults to http://<container_ip>:8080/rss
# Command to run the application # Command to run the application
ENTRYPOINT ["/app/icecast-ripper"] ENTRYPOINT ["/app/icecast-ripper"]

View File

@@ -7,10 +7,13 @@ services:
- "8080:8080" - "8080:8080"
environment: environment:
- STREAM_URL=http://example.com/stream - STREAM_URL=http://example.com/stream
- CHECK_INTERVAL=60 - CHECK_INTERVAL=1m
- OUTPUT_DIRECTORY=/records - RECORDINGS_PATH=/records
- CONNECT_TIMEOUT=10 - TEMP_PATH=/app/temp
- FIRST_BYTE_TIMEOUT=30 - SERVER_ADDRESS=:8080
- WEB_SERVER_PORT=8080 - RSS_FEED_URL=http://localhost:8080/rss
- LOG_LEVEL=info
volumes: volumes:
- ./records:/records - ./records:/records
- ./temp:/app/temp
- ./data:/app/data

View File

@@ -12,7 +12,6 @@ type Config struct {
CheckInterval time.Duration `mapstructure:"CHECK_INTERVAL"` CheckInterval time.Duration `mapstructure:"CHECK_INTERVAL"`
RecordingsPath string `mapstructure:"RECORDINGS_PATH"` RecordingsPath string `mapstructure:"RECORDINGS_PATH"`
TempPath string `mapstructure:"TEMP_PATH"` TempPath string `mapstructure:"TEMP_PATH"`
DatabasePath string `mapstructure:"DATABASE_PATH"`
ServerAddress string `mapstructure:"SERVER_ADDRESS"` ServerAddress string `mapstructure:"SERVER_ADDRESS"`
RSSFeedURL string `mapstructure:"RSS_FEED_URL"` RSSFeedURL string `mapstructure:"RSS_FEED_URL"`
LogLevel string `mapstructure:"LOG_LEVEL"` LogLevel string `mapstructure:"LOG_LEVEL"`
@@ -29,7 +28,6 @@ func LoadConfig() (*Config, error) {
"CHECK_INTERVAL": "1m", "CHECK_INTERVAL": "1m",
"RECORDINGS_PATH": "./recordings", "RECORDINGS_PATH": "./recordings",
"TEMP_PATH": "./temp", "TEMP_PATH": "./temp",
"DATABASE_PATH": "./icecast-ripper.db",
"SERVER_ADDRESS": ":8080", "SERVER_ADDRESS": ":8080",
"RSS_FEED_URL": "http://localhost:8080/rss", "RSS_FEED_URL": "http://localhost:8080/rss",
"LOG_LEVEL": "info", "LOG_LEVEL": "info",