corrected env vars for being dynamic
This commit is contained in:
@@ -18,6 +18,8 @@ ENV DOWNLOAD_FOLDER=/tmp/downloads
|
||||
# Ammount (in secs) before file autodeletes
|
||||
ENV FILE_AUTODELETE_DELAY_SECS=300
|
||||
|
||||
ENV ROOT_PATH=/
|
||||
|
||||
VOLUME ["/tmp/downloads"]
|
||||
|
||||
CMD ["python3", "main.py"]
|
||||
|
||||
@@ -23,9 +23,9 @@ ENV HOST=0.0.0.0
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
ENV DOWNLOAD_FOLDER=/tmp/downloads
|
||||
ENV NUXT_DOWNLOAD_FOLDER=/tmp/downloads
|
||||
VOLUME ["/tmp/downloads"]
|
||||
|
||||
ENV FASTAPI_URL=http://127.0.0.1:8000
|
||||
ENV NUXT_FASTAPI_URL=http://127.0.0.1:8000
|
||||
|
||||
CMD ["node", "/app/server/index.mjs"]
|
||||
@@ -40,9 +40,10 @@ services:
|
||||
- "64002:3030" # just for the admin GUI
|
||||
- "6903:3000"
|
||||
environment:
|
||||
- FASTAPI_URL=http://fastapi:8000
|
||||
- DOWNLOAD_FOLDER=/tmp/downloads
|
||||
- NUXT_FASTAPI_URL=http://fastapi:8000
|
||||
- NUXT_DOWNLOAD_FOLDER=/tmp/downloads
|
||||
- NUXT_SESSION_PASSWORD=bc7d4da7d5f64d47aa75da92bed68cd8
|
||||
- NUXT_APP_BASE_URL=/
|
||||
volumes:
|
||||
- music_downloads:/tmp/downloads
|
||||
# These 3 are just for "nuxtjs-launcher"
|
||||
|
||||
@@ -16,7 +16,8 @@ export default defineNuxtConfig({
|
||||
plugins: [ tailwindcss() ]
|
||||
},
|
||||
runtimeConfig: {
|
||||
fastapi_url: process.env.FASTAPI_URL || "http://fastapi:8000",
|
||||
download_path: process.env.DOWNLOAD_FOLDER || "/tmp/downloads"
|
||||
// overridable by NUXT_variable
|
||||
fastapi_url: "http://fastapi:8000",
|
||||
download_path: "/tmp/downloads"
|
||||
}
|
||||
})
|
||||
@@ -16,11 +16,14 @@ import db_setup as db # Import the entire db_setup module
|
||||
from user_mgmt import *
|
||||
from media_mgmt import *
|
||||
|
||||
pathRoot = os.environ.get("ROOT_PATH","/")
|
||||
|
||||
app = FastAPI(
|
||||
title="YT2MP3 API",
|
||||
description="Simple API to download YouTube videos as MP3.",
|
||||
version="1.0.0",
|
||||
license_info="MIT",
|
||||
root_path=pathRoot,
|
||||
lifespan=db.lifespan
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user