diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 0000000..a5f313f --- /dev/null +++ b/.dockerignore @@ -0,0 +1,44 @@ +# Node modules +node_modules +dist + +# Testing +coverage +.nyc_output + +# Logs +logs +*.log + +# Cache +.cache + +# IDE and editor files +.idea +.vscode +*.iml + +# Git-related files +.git +.gitignore + +# npm/yarn/pnpm cache and lockfiles (optional, uncomment if used) +.npm +# .yarn +# yarn.lock +# pnpm-lock.yaml + +# Operating system files +.DS_Store +Thumbs.db + +# Configuration files +.env + +# Other temporary files +*.swp +*.swo +*~ + +# SIMPLE exclusive +learning-packages \ No newline at end of file diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..4a7378f --- /dev/null +++ b/Dockerfile @@ -0,0 +1,22 @@ +# Use a Node base image +FROM node:22-alpine + +# Set the working directory in the container +WORKDIR /app + +# Copy React app +COPY . . + +# Debug line as env file isn't supported yet... +RUN find /app/src -type f -exec sed -i "s/localhost/0\.0\.0\.0/g" "{}" \; + +# Install dependencies +RUN npm install + +# Expose the port your app runs on +EXPOSE 8000 +EXPOSE 8001 +EXPOSE 8080 + +# Start the application +CMD ["npm", "start"]