2025-01-25 20:01:21 -08:00
|
|
|
FROM denoland/deno:latest
|
|
|
|
|
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 20:01:21 -08:00
|
|
|
RUN deno i
|
|
|
|
|
|
|
|
# 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
|
|
|
|
RUN deno task build
|
|
|
|
|
|
|
|
# Expose port 80 for the application
|
|
|
|
EXPOSE 3000
|
|
|
|
ENV NITRO_PORT 3000
|
|
|
|
|
|
|
|
# Verify the file exists and can be executed
|
|
|
|
RUN ls -la .output/server/
|
|
|
|
|
|
|
|
# Run the Deno server
|
|
|
|
CMD deno run --allow-all .output/server/index.mjs
|