Skip to content

Commit

Permalink
feat(docker): adding docker config
Browse files Browse the repository at this point in the history
  • Loading branch information
Aman Agarwal authored and Aman Agarwal committed Nov 21, 2023
1 parent 681db5d commit 9d3a856
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 0 deletions.
23 changes: 23 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Use the official Node.js 14 image as a base
FROM node:18-alpine

# Set the working directory inside the container
WORKDIR /usr/src/app

# Copy package.json and package-lock.json to the working directory
COPY package*.json ./

# Install dependencies
RUN npm install

# Copy the rest of the application code to the container
COPY . .

# Build the Next.js app
RUN npm run build

# Expose the desired port
EXPOSE 3000

# Start the Next.js app
CMD ["node", "server.js"]
9 changes: 9 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: '3'

services:
admin-ui:
build:
context: .
dockerfile: Dockerfile
ports:
- "3000:3000"
1 change: 1 addition & 0 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ const nextConfig = {

reactStrictMode: true,
swcMinify: true,
output: 'standalone',

// Uncoment to add domain whitelist
// images: {
Expand Down

0 comments on commit 9d3a856

Please sign in to comment.