instruction: Create a Dockerfile for Node.js with production best practices
output: ```dockerfile
  from the environment variable S3_BUCKET_NAME. Each uploaded file is given a unique name by appending the current timestamp to the original filename. The route then returns the URL of the uploaded file within the local S3 service, making it accessible just as it would be if hosted on a real AWS S3 bucket.Letâs see it in action. Start by launching the Node.js backend service.Change to the backend/ directory
  
  $ cd backend/
  Install the required dependencies:
  
  $ npm install
  Setting up AWS environment variablesThe .env file located in the backend/ directory already contains placeholder credentials and configuration values that LocalStack uses to emulate AWS services. The AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY are placeholder credentials, while S3_BUCKET_NAME and S3_ENDPOINT_URL are configuration settings. No changes are needed as these values are already correctly set for LocalStack.
  TipGiven that youâre running Mongo in a Docker container and the backend Node app is running natively on your host, ensure that MONGODB_URI=mongodb://localhost:27017/todos is set in your .env file.
  
  MONGODB_URI=mongodb://localhost:27017/todos
  AWS_ACCESS_KEY_ID=test
  AWS_SECRET_ACCESS_KEY=test
  S3_BUCKET_NAME=mysamplebucket
  S3_ENDPOINT_URL=http://localhost:4566
  AWS_REGION=us-east-1While the AWS SDK might typically use environment variables starting with AWS_, this specific application directly references the following S3_* variables in the index.js file (under the backend/ directory) to configure the S3Client.
  
  const s3 = new S3Client({
   endpoint: process.env.S3_ENDPOINT_URL, // Use the provided endpoint or fallback to defaults
   credentials: {
   accessKeyId: process.env.AWS_ACCESS_KEY_ID || 'default_access_key', // Default values for development
   secretAccessKey: process.env.AWS_SECRET_ACCESS_KEY || 'default_secret_key',
   },
  });Start the backend server:
  
  $ node index.js
  You will see the message that the backend service has successfully started at port 5000.Start the frontend serviceTo start the frontend service, open a new terminal and follow these steps:Navigate to the frontend directory:
  
  $ cd frontend
  Install the required dependencies
  
  $ npm install
  Start the frontend service
  
  $ npm run dev
  By now, you should see the following message:
  
  VITE v5.4.2 ready in 110 ms
  â Local: http://localhost:5173/
  â Network: use --host to expose
  â press h + enter to show help
  You can now access the app via http://localhost:5173. Go ahead, and upload an image by choosing an image file and clicking the Upload button.
  You can verify the image is uploaded to the S3 bucket by checking the LocalStack container logs:
  The 200 status code signifies that the putObject operation, which involves uploading an object to the S3 bucket, was executed successfully within the LocalStack environment. LocalStack logs this entry to provide visibility into the operations being performed. It helps debug and confirm that your application is interacting correctly with the emulated AWS services.Since LocalStack is designed to simulate AWS services locally, this log entry shows that your application is functioning as expected when performing cloud operations in a local sandbox environment.<h2 class=scroll-mt-20 id=connecting-to-localstack-
  ```