mirror of
https://github.com/hpware/news-analyze.git
synced 2025-06-23 21:14:23 +00:00
Add working docker & docker compose.
This commit is contained in:
parent
e6b2bf3cbe
commit
69db408fe2
1 changed files with 4 additions and 14 deletions
14
Dockerfile
14
Dockerfile
|
@ -10,7 +10,7 @@
|
||||||
|
|
||||||
# Install dependencies
|
# Install dependencies
|
||||||
RUN bun pm untrusted
|
RUN bun pm untrusted
|
||||||
RUN bun install --prod
|
RUN bun install
|
||||||
|
|
||||||
# Copy source files
|
# Copy source files
|
||||||
COPY . .
|
COPY . .
|
||||||
|
@ -26,19 +26,9 @@
|
||||||
# Copy package files for production
|
# Copy package files for production
|
||||||
COPY --from=builder /app/package.json ./
|
COPY --from=builder /app/package.json ./
|
||||||
|
|
||||||
# Create a shell script to handle build output copying
|
|
||||||
RUN echo '#!/bin/sh\n\
|
|
||||||
for dir in ".output" "dist" "build" ".next"; do\n\
|
|
||||||
if [ -d "/build/$dir" ]; then\n\
|
|
||||||
mkdir -p "$dir"\n\
|
|
||||||
fi\n\
|
|
||||||
done' > /copy-builds.sh && chmod +x /copy-builds.sh
|
|
||||||
|
|
||||||
# Copy build outputs from builder
|
# Copy build outputs from builder
|
||||||
COPY --from=builder /app /build
|
COPY --from=builder /app/.output /app/.output
|
||||||
RUN /copy-builds.sh && rm -rf /build /copy-builds.sh
|
|
||||||
|
|
||||||
# Install production dependencies
|
|
||||||
RUN bun install --production
|
RUN bun install --production
|
||||||
|
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue