diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..d0cdf9a --- /dev/null +++ b/.dockerignore @@ -0,0 +1,55 @@ +# Environment files +.env +.env.* +*.env + +# Version control +.git +.gitignore +.svn +.hg + +# Development files +node_modules +venv +__pycache__ +*.pyc +*.pyo +*.pyd +.Python +.pytest_cache +.coverage +coverage +.tox + +# IDE specific files +.idea +.vscode +*.swp +*.swo +.DS_Store + +# Build and dist directories +dist +build +*.egg-info + +# Log files +*.log +logs +npm-debug.log* + +# Docker specific +Dockerfile +docker-compose*.yml +.docker + +# Documentation +docs +README.md +CHANGELOG.md +LICENSE + +# Test files +test +tests \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..3fbf4ba --- /dev/null +++ b/Dockerfile @@ -0,0 +1,20 @@ +# Use the official Node.js image as the base image +FROM node:22 + +# Set the working directory inside the container +WORKDIR /app + +# Copy package.json and package-lock.json to the working directory +COPY prisma ./prisma package*.json ./ + +# Install dependencies +RUN npm install + +# Copy the rest of the application code to the working directory +COPY . . + +# Expose the port the app runs on +EXPOSE 3000 + +# Command to run the application +CMD ["npm", "start"] \ No newline at end of file diff --git a/package.json b/package.json index e41a6fd..0c26e44 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "scripts": { "dev": "next dev", "build": "npx prisma generate && next build", - "start": "next start", + "start": "npm run build && next start", "lint": "next lint", "postinstall": "prisma generate" },