personal-site/Dockerfile

23 lines
402 B
Text
Raw Normal View History

2025-01-25 21:08:35 -08:00
FROM denoland/deno:latest
2025-01-25 20:01:21 -08:00
2025-01-25 19:40:37 -08:00
WORKDIR /app
2025-01-25 20:01:21 -08:00
# Copy the package.json and install dependencies
2025-01-25 19:40:37 -08:00
COPY package*.json ./
2025-01-25 21:08:35 -08:00
RUN deno i
2025-01-25 20:01:21 -08:00
# Copy the rest of the application
2025-01-25 19:40:37 -08:00
COPY . .
2025-01-25 20:01:21 -08:00
# Run build task
2025-01-25 21:08:35 -08:00
RUN deno task build
2025-01-25 20:01:21 -08:00
# Expose port 80 for the application
EXPOSE 3000
# Verify the file exists and can be executed
RUN ls -la .output/server/
# Run the Deno server
2025-01-25 21:08:35 -08:00
CMD deno run --allow-all .output/server/index.mjs