enhancement: Docker image consolidation

This commit is contained in:
pluja
2023-11-21 17:29:16 +01:00
parent 7dc703c335
commit 8dca6cc897
12 changed files with 353 additions and 308 deletions

View File

@@ -22,7 +22,6 @@ ARG TARGETARCH
WORKDIR /app
COPY --from=builder /app/whishper ./whishper
RUN chmod a+rx ./whishper
COPY --from=ytdlp_cache /usr/local/bin/yt-dlp /bin/yt-dlp
RUN mkdir /app/uploads

View File

@@ -32,7 +32,8 @@ func NewMongoDb() *MongoDb {
}
// Set auth method to PLAIN if using FerretDB
if os.Getenv("FERRETDB_MONGO_URL") != "" {
if os.Getenv("FERRETDB_ENABLED") != "" {
log.Printf("FerretDB enabled, setting auth mechanism to PLAIN...")
credentials.AuthMechanism = "PLAIN"
}

View File

@@ -19,7 +19,7 @@ func main() {
listenAddr := flag.String("addr", ":8080", "server listen address")
uploadDir := flag.String("updir", "/app/uploads", "upload directory")
asrEndpoint := flag.String("asr", "transcription-api:8000", "asr endpoint, i.e. localhost:9888")
asrEndpoint := flag.String("asr", "127.0.0.1:8000", "asr endpoint, i.e. localhost:9888")
dbHost := flag.String("db", "mongo:27017", "database endpoint host, i.e. localhost:27017")
dbUser := flag.String("dbuser", "root", "database user")
dbPass := flag.String("dbpass", "example", "database password")