make docker build uses the next UI
This commit is contained in:
parent
0239e509de
commit
4b322a6f5a
4 changed files with 10 additions and 9 deletions
|
|
@ -1,3 +1,3 @@
|
||||||
.git
|
.git
|
||||||
.venv
|
.venv
|
||||||
ui/
|
cd
|
||||||
|
|
|
||||||
1
.gitignore
vendored
1
.gitignore
vendored
|
|
@ -1,5 +1,6 @@
|
||||||
# compiled output
|
# compiled output
|
||||||
/frontend/dist
|
/frontend/dist
|
||||||
|
/ui/dist
|
||||||
|
|
||||||
# dependencies
|
# dependencies
|
||||||
**/node_modules/*
|
**/node_modules/*
|
||||||
|
|
|
||||||
10
Dockerfile
10
Dockerfile
|
|
@ -1,8 +1,8 @@
|
||||||
FROM node:lts-alpine AS npm_builder
|
FROM node:lts-alpine AS node_builder
|
||||||
|
|
||||||
WORKDIR /ytptube
|
WORKDIR /app
|
||||||
COPY frontend ./
|
COPY ui ./
|
||||||
RUN npm ci && npm run build
|
RUN yarn install --production --prefer-offline --frozen-lockfile && yarn run generate
|
||||||
|
|
||||||
FROM python:3.11-alpine AS python_builder
|
FROM python:3.11-alpine AS python_builder
|
||||||
|
|
||||||
|
|
@ -44,7 +44,7 @@ COPY entrypoint.sh /
|
||||||
RUN sed -i 's/\r$//g' /entrypoint.sh && chmod +x /entrypoint.sh
|
RUN sed -i 's/\r$//g' /entrypoint.sh && chmod +x /entrypoint.sh
|
||||||
|
|
||||||
COPY --chown=app:app ./app /app/app
|
COPY --chown=app:app ./app /app/app
|
||||||
COPY --chown=app:app --from=npm_builder /ytptube/dist /app/frontend/dist
|
COPY --chown=app:app --from=node_builder /app/exported /app/ui/dist
|
||||||
COPY --chown=app:app --from=python_builder /app/.venv /opt/python
|
COPY --chown=app:app --from=python_builder /app/.venv /opt/python
|
||||||
COPY --chown=app:app ./healthcheck.sh /usr/local/bin/healthcheck
|
COPY --chown=app:app ./healthcheck.sh /usr/local/bin/healthcheck
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -594,7 +594,7 @@ class Main:
|
||||||
if not self.appLoader:
|
if not self.appLoader:
|
||||||
with open(os.path.join(
|
with open(os.path.join(
|
||||||
os.path.dirname(os.path.dirname(os.path.realpath(__file__))),
|
os.path.dirname(os.path.dirname(os.path.realpath(__file__))),
|
||||||
'frontend/dist/index.html'
|
'ui/dist/index.html'
|
||||||
), 'r') as f:
|
), 'r') as f:
|
||||||
self.appLoader = f.read()
|
self.appLoader = f.read()
|
||||||
|
|
||||||
|
|
@ -809,7 +809,7 @@ class Main:
|
||||||
'X-Via': 'memory' if not item.get('file', None) else 'disk',
|
'X-Via': 'memory' if not item.get('file', None) else 'disk',
|
||||||
})
|
})
|
||||||
|
|
||||||
staticDir = os.path.join(os.path.dirname(os.path.dirname(os.path.realpath(__file__))), 'frontend/dist')
|
staticDir = os.path.join(os.path.dirname(os.path.dirname(os.path.realpath(__file__))), 'ui/dist')
|
||||||
for root, _, files in os.walk(staticDir):
|
for root, _, files in os.walk(staticDir):
|
||||||
for file in files:
|
for file in files:
|
||||||
if file.endswith('.map'):
|
if file.endswith('.map'):
|
||||||
|
|
@ -838,7 +838,7 @@ class Main:
|
||||||
|
|
||||||
self.app.on_response_prepare.append(on_prepare)
|
self.app.on_response_prepare.append(on_prepare)
|
||||||
except ValueError as e:
|
except ValueError as e:
|
||||||
if 'frontend/dist' in str(e):
|
if 'ui/dist' in str(e):
|
||||||
raise RuntimeError('Could not find the frontend UI static assets.') from e
|
raise RuntimeError('Could not find the frontend UI static assets.') from e
|
||||||
raise e
|
raise e
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue