Rename application to "planning-fight" and update Dockerfile for improved build and runtime setup.
This commit is contained in:
parent
c2ade4ddab
commit
c6aa6cb1d7
2 changed files with 11 additions and 6 deletions
15
Dockerfile
15
Dockerfile
|
|
@ -6,18 +6,23 @@ RUN corepack enable
|
|||
# Set the working directory in the container
|
||||
WORKDIR /usr/src/app
|
||||
|
||||
# Copy the current directory contents into the container at /usr/src/app
|
||||
# Copy your manifest files first for better caching
|
||||
COPY package.json yarn.lock ./
|
||||
|
||||
# Install ALL dependencies (including devDependencies)
|
||||
RUN yarn install --production=false
|
||||
|
||||
# Copy the rest of your project
|
||||
COPY . .
|
||||
|
||||
# Install your app dependencies using the npm binary
|
||||
RUN yarn
|
||||
# Build the Next.js app
|
||||
RUN yarn build
|
||||
|
||||
# Install PM2 globally
|
||||
RUN npm install pm2 -g
|
||||
|
||||
# Your app binds to port 3000 so you'll use the EXPOSE instruction to have it mapped by the docker daemon
|
||||
# App listens on port 3000
|
||||
EXPOSE 3000
|
||||
|
||||
# Define the runtime command to run your application
|
||||
# Run Next using PM2
|
||||
CMD ["pm2-runtime", "start", "npm", "--", "start"]
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"name": "presence-tracker",
|
||||
"name": "planning-fight",
|
||||
"version": "0.1.0",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
|
|
|
|||
Loading…
Reference in a new issue