Rename application to "planning-fight" and update Dockerfile for improved build and runtime setup.
This commit is contained in:
parent
c6aa6cb1d7
commit
66aecbbd74
4 changed files with 354 additions and 4282 deletions
1
.yarnrc.yml
Normal file
1
.yarnrc.yml
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
nodeLinker: node-modules
|
||||||
15
Dockerfile
15
Dockerfile
|
|
@ -6,23 +6,18 @@ RUN corepack enable
|
||||||
# Set the working directory in the container
|
# Set the working directory in the container
|
||||||
WORKDIR /usr/src/app
|
WORKDIR /usr/src/app
|
||||||
|
|
||||||
# Copy your manifest files first for better caching
|
# Copy the current directory contents into the container at /usr/src/app
|
||||||
COPY package.json yarn.lock ./
|
|
||||||
|
|
||||||
# Install ALL dependencies (including devDependencies)
|
|
||||||
RUN yarn install --production=false
|
|
||||||
|
|
||||||
# Copy the rest of your project
|
|
||||||
COPY . .
|
COPY . .
|
||||||
|
|
||||||
# Build the Next.js app
|
# Install your app dependencies using the npm binary
|
||||||
|
RUN yarn
|
||||||
RUN yarn build
|
RUN yarn build
|
||||||
|
|
||||||
# Install PM2 globally
|
# Install PM2 globally
|
||||||
RUN npm install pm2 -g
|
RUN npm install pm2 -g
|
||||||
|
|
||||||
# App listens on port 3000
|
# Your app binds to port 3000 so you'll use the EXPOSE instruction to have it mapped by the docker daemon
|
||||||
EXPOSE 3000
|
EXPOSE 3000
|
||||||
|
|
||||||
# Run Next using PM2
|
# Define the runtime command to run your application
|
||||||
CMD ["pm2-runtime", "start", "npm", "--", "start"]
|
CMD ["pm2-runtime", "start", "npm", "--", "start"]
|
||||||
|
|
|
||||||
3961
package-lock.json
generated
3961
package-lock.json
generated
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue