We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
# Base on offical Node.js image FROM node:18-alpine # Pnpm with docker ENV PNPM_HOME="/pnpm" ENV PATH="$PNPM_HOME:$PATH" RUN corepack enable RUN ln -s /lib/libc.musl-x86_64.so.1 /lib/ld-linux-x86-64.so.2 # Set working directory WORKDIR /usr/app # Install PM2 globally RUN pnpm install pm2 --global # Copy files to docker COPY ./ ./ # Install dependencies RUN pnpm install --production --frozen-lockfile # Build app RUN pnpm build # Expose the listening port EXPOSE 3000 WORKDIR /usr/app RUN mkdir /usr/app/pm2 RUN mkdir /usr/app/pm2/logs RUN chmod -R 777 /usr/app/pm2/ # Show current folder structure in logs WORKDIR /usr/app CMD ["pm2-runtime", "start", "pm2.config.js"]
module.exports = { apps: [ { name: 'next', exec_mode: 'cluster', instances: 1, args: 'start', cwd: '/usr/app/', script: './node_modules/next/dist/bin/next', watch: false, autorestart: true, combine_logs: true, exp_backoff_restart_delay: 100, ignore_watch: ['node_modules'], log_date_format: 'YYYY-MM-DD HH:mm Z', error_file: './pm2/logs/next_err.log' } ] }
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The text was updated successfully, but these errors were encountered: