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