added nixpacks configs

This commit is contained in:
2026-07-12 22:57:41 +02:00
parent 5726c65e15
commit 0d2b5b3c22

34
nixpacks.toml Normal file
View File

@@ -0,0 +1,34 @@
# Nixpacks configuration for velocity-backend-spring-boot
# Replicates the behavior of the existing Dockerfile for Dokploy deployment
[phases]
[phases.setup]
nixPkgs = [
"fontconfig",
"dejavu_fonts",
]
[phases.build]
# Override default Maven command to use the production profile
# Equivalent to: RUN mvn clean compile -P production package
cmds = [
"mvn clean compile -P production package"
]
[start]
# Equivalent to: CMD ["java", "-Djava.awt.headless=true", "-Dspring.profiles.active=nflow.db.postgresql", "-jar", "/app/target/tm-0.0.1-RELEASE.jar"]
cmd = "java -Djava.awt.headless=true -Dspring.profiles.active=nflow.db.postgresql -jar /app/target/tm-0.0.1-RELEASE.jar"
[variables]
# Use Java 17 as defined in pom.xml properties
JAVA_VERSION = "17"
[env]
# List of environment variables the application expects
# These can be overridden in Dokploy's environment settings
SPRING_PROFILES_ACTIVE = "nflow.db.postgresql"
JAVA_OPTS = "-Djava.awt.headless=true"
[deploy]
# Ports exposed by the application (from compose.yml)
ports = [8058, 6950]