fix(stremio-streaming-catalogs): build vue app in build step and add VITE_APP_URL

This commit is contained in:
Viren070
2025-08-24 21:45:41 +01:00
parent 87836e2048
commit 270d5c8f77
+34 -19
View File
@@ -6,21 +6,43 @@ services:
build:
context: https://github.com/rleroi/Stremio-Streaming-Catalogs-Addon.git
dockerfile_inline: |
FROM node:22.17-alpine
# Build Vue app
FROM node:22.17-alpine AS build
WORKDIR /app
COPY package*.json ./
# Install production dependencies only
RUN npm ci --omit=dev --ignore-scripts && \
npm cache clean --force
# Copy application files
# Copy Vue app files
COPY vue ./vue
COPY index.js addon.js ./
# Remove existing .env files in Vue directory if any
RUN rm -f ./vue/.env
RUN rm -f ./vue/.env.development
ENV VITE_APP_URL=https://${STREMIO_STREAMING_CATALOGS_HOSTNAME?}
RUN cd vue && npm ci && npm run build
# Build final production image
FROM node:22.17-alpine AS production
RUN apk add --no-cache curl
WORKDIR /app
# Copy app files
COPY index.js .
COPY addon.js .
COPY package*.json .
# Copy built Vue app
COPY --from=build /app/vue/dist ./vue/dist
COPY --from=build /app/vue/package*.json ./vue/
COPY --from=build /app/vue/public ./vue/public
# Install production dependencies
RUN npm ci --only=production
ENV NODE_ENV=production
EXPOSE ${PORT:-7700}
HEALTHCHECK --interval=30s --timeout=3s --start-period=5s --retries=3 \
CMD curl -f http://localhost:${PORT:-7700}/manifest.json || exit 1
ENTRYPOINT ["npm", "start"]
expose:
- 7700
@@ -34,18 +56,11 @@ services:
- "traefik.http.services.stremio-streaming-catalogs.loadbalancer.server.port=7700"
- "traefik.http.routers.stremio-streaming-catalogs.middlewares=authelia@docker"
healthcheck:
test:
[
"CMD",
"wget",
"--quiet",
"--tries=1",
"--spider",
"http://localhost:7700/manifest.json",
]
test: "curl -fSs http://localhost:7700/manifest.json || exit 1"
interval: 30s
timeout: 10s
timeout: 3s
retries: 3
start_period: 5s
profiles:
- stremio-streaming-catalogs
- all