Skip to content
Snippets Groups Projects
Commit 9b6a77bb authored by Dysk0's avatar Dysk0
Browse files

Commit.

parent 6fe6190d
Branches
No related tags found
No related merge requests found
# Next.js build output
.next
out/
# Node modules
node_modules/
.env
dist/
# Environment variables
.env.local
.env.development.local
.env.test.local
.env.production.local
# Logs
*.log
# Use an official Node.js runtime as a parent image
FROM node:16-alpine
# Set the working directory in the container
WORKDIR /app
# Copy package.json and package-lock.json (or yarn.lock) into the container
COPY package*.json ./
# Install dependencies
RUN npm install
# Copy the rest of your app's source code
COPY . .
# Build your Next.js app
RUN npm run build
# Expose port 3000 to the outside once the container is running
EXPOSE 3000
# Define the command to run your app using npm start script
CMD ["npm", "start"]
version: '3.8'
services:
web:
image: node:14
volumes:
- ./:/usr/src/app
working_dir: /usr/src/app
command: npm start
build: .
ports:
- "3000:3000"
- '3000:3000'
volumes:
- .:/app
- /app/node_modules
environment:
NODE_ENV: development
\ No newline at end of file
- NODE_ENV=development
command: npm run dev
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment