Rename application to "planning-fight" and update Dockerfile for improved build and runtime setup.

This commit is contained in:
Mathieu 2025-11-20 16:09:44 +01:00
parent c2ade4ddab
commit c6aa6cb1d7
2 changed files with 11 additions and 6 deletions

View file

@ -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"]

View file

@ -1,5 +1,5 @@
{
"name": "presence-tracker",
"name": "planning-fight",
"version": "0.1.0",
"private": true,
"scripts": {