MyFavStuff5/nixpacks.toml

36 lines
1.1 KiB
TOML

# nixpacks.toml
# Explicitly set the provider to 'static'
[provider]
name = "static"
website = "https://gohugo.io/"
# This section ensures that Hugo is available in the build environment.
# Nixpacks will use Nix to provide the 'hugo' package.
[phases.setup]
providers = ["node", "rust", "go"] # Ensures common build toolchains are available
nix_pkgs = ["hugo"]
# This section defines variables used during the build
[variables]
NIXPACKS_STATIC_COMMAND = "hugo --verbose --minify"
# This section defines the command(s) to build your Hugo site.
# Using "--verbose" can give more detailed output from Hugo during the build if needed.
# Using "--minify" is good practice to reduce file sizes.
[phases.build]
cmds = ["$NIXPACKS_STATIC_COMMAND"]
# This section tells Nixpacks where your built static site will be located.
# Coolify will then use this 'public' directory to serve your website.
[start]
public_dir = "public"
# No 'cmd' is needed here for static sites, as Coolify handles the serving.
# Make sure the static site server is used
[phases.install]
cmds = ["echo 'Using Hugo to build a static site'"]
[staticserver]
package = "nginx"