Skip to content
New issue

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

build: add nixpacks.toml base on Dockerfile #12016

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Rot4tion
Copy link

@Rot4tion Rot4tion commented Apr 6, 2025

Add nixpacks.toml based on Dockerfile

What?

Added a nixpacks.toml configuration file that replicates the build and deployment process defined in the existing Dockerfile, providing an alternative deployment method for the PayloadCMS application.

Why?

  • Enables deployment on platforms that support Nixpacks (like Railway, Render, etc.)
  • Simplifies the deployment configuration with a more concise format
  • Maintains the same build and runtime behavior as the Docker setup
  • Provides flexibility for different deployment environments

How?

  • Created a nixpacks.toml file that follows the same build phases as the Dockerfile:
    • Install dependencies using pnpm
    • Build the application
    • Prepare the output by copying necessary files
  • Configured environment variables for production
  • Set up caching for node_modules and pnpm store to improve build performance
  • Defined the start command to run the Next.js server

This configuration maintains compatibility with the existing Docker-based deployment while offering an alternative deployment method.

@Rot4tion Rot4tion changed the title add nixpacks.toml base on Dockerfile build: add nixpacks.toml base on Dockerfile Apr 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant