Fix docker related issues
This commit is contained in:
parent
620666e7f1
commit
0823a15744
2 changed files with 13 additions and 9 deletions
20
Dockerfile
20
Dockerfile
|
|
@ -22,14 +22,18 @@ COPY . .
|
||||||
RUN pnpm build
|
RUN pnpm build
|
||||||
|
|
||||||
# Production image
|
# Production image
|
||||||
FROM base AS runner
|
FROM nginx:alpine AS runner
|
||||||
COPY --from=deps /app/node_modules ./node_modules
|
COPY --from=builder /app/dist /usr/share/nginx/html
|
||||||
COPY --from=builder /app/dist ./dist
|
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||||
|
|
||||||
|
# Create videos directory
|
||||||
|
RUN mkdir -p /usr/share/nginx/html/videos
|
||||||
|
|
||||||
# Copy specific directories from public
|
# Copy specific directories from public
|
||||||
COPY --from=builder /app/public/images ./dist/images
|
COPY --from=builder /app/public/images /usr/share/nginx/html/images
|
||||||
COPY --from=builder /app/public/subtitles ./dist/subtitles
|
COPY --from=builder /app/public/subtitles /usr/share/nginx/html/subtitles
|
||||||
COPY --from=builder /app/public/transcriptions ./dist/transcriptions
|
COPY --from=builder /app/public/transcriptions /usr/share/nginx/html/transcriptions
|
||||||
COPY package.json ./
|
|
||||||
|
|
||||||
EXPOSE 804
|
EXPOSE 804
|
||||||
CMD ["pnpm", "preview", "--port", "804", "--host"]
|
|
||||||
|
CMD ["nginx", "-g", "daemon off;"]
|
||||||
|
|
|
||||||
|
|
@ -11,7 +11,7 @@ services:
|
||||||
volumes:
|
volumes:
|
||||||
- type: bind
|
- type: bind
|
||||||
source: /docker/websites/deafgain/video_content
|
source: /docker/websites/deafgain/video_content
|
||||||
target: /app/dist/videos
|
target: /usr/share/nginx/html/videos
|
||||||
environment:
|
environment:
|
||||||
- NODE_ENV=production
|
- NODE_ENV=production
|
||||||
- PORT=804
|
- PORT=804
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue