Some checks failed
Build and Push Docker Image / build-and-push (push) Failing after 1m25s
- Introduced .dockerignore to exclude unnecessary files from Docker context. - Updated Dockerfile to use Bun for building and running the application. - Removed entrypoint.sh as it is no longer needed. - Modified build-and-dockerise.yml to set up Bun and install dependencies. - Enhanced index.html with improved structure and hover effects. - Updated client.ts to include tooltips for music display. - Implemented caching in server.ts for Last.fm data. - Added custom styles for hover effects and tooltips in style.css.
37 lines
No EOL
674 B
Docker
37 lines
No EOL
674 B
Docker
# Build stage
|
|
FROM oven/bun:latest as builder
|
|
|
|
WORKDIR /app
|
|
|
|
# Copy package files
|
|
COPY package.json bun.lock* ./
|
|
|
|
# Install all dependencies (including devDependencies for building)
|
|
RUN bun install --frozen-lockfile
|
|
|
|
# Copy source code
|
|
COPY . .
|
|
|
|
# Build the application
|
|
RUN bun run build
|
|
|
|
# Production stage
|
|
FROM oven/bun:latest
|
|
|
|
WORKDIR /app
|
|
|
|
# Copy package files
|
|
COPY package.json bun.lock* ./
|
|
|
|
# Install only production dependencies
|
|
RUN bun install --frozen-lockfile --production
|
|
|
|
# Copy built application and server
|
|
COPY --from=builder /app/dist ./dist
|
|
COPY src/server.ts ./src/server.ts
|
|
|
|
# Expose the port
|
|
EXPOSE 3000
|
|
|
|
# Start the application
|
|
CMD ["bun", "run", "prod"] |