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
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

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
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://<container_ip>:8080/rss
# Command to run the application
ENTRYPOINT ["/app/icecast-ripper"]

View File

@@ -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

View File

@@ -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",