Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions .github/workflows/create-pr.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
name: Auto PR to main when version changes

on:
push:
branches:
- canary
# Disabled on the nomploy fork (Dokploy release automation). Run manually.
workflow_dispatch:

permissions:
contents: write
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
name: Build Docker images

on:
push:
branches: [main, canary]
# Disabled automatic runs on the fork (needs registry secrets). Run manually.
workflow_dispatch:

jobs:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/monitoring.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Nomploy Monitoring Build

on:
push:
branches: [main, canary]
# Disabled on the fork (needs Docker Hub secrets). Run manually.
workflow_dispatch:

env:
IMAGE_NAME: nomploy/monitoring
Expand Down
3 changes: 1 addition & 2 deletions .github/workflows/nomploy.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
name: Nomploy Docker Build

on:
push:
branches: [main, canary, "fix/re-apply-database-migration-fix"]
# Disabled automatic runs on the fork (needs registry secrets). Run manually.
workflow_dispatch:

env:
Expand Down
10 changes: 1 addition & 9 deletions .github/workflows/sync-openapi-docs.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
name: Generate and Sync OpenAPI

on:
push:
branches:
- canary
- main
paths:
- 'apps/dokploy/server/api/routers/**'
- 'packages/server/src/services/**'
- 'packages/server/src/db/schema/**'

# Disabled automatic runs on the fork (syncs to external docs; needs secrets). Run manually.
workflow_dispatch:

jobs:
Expand Down
9 changes: 8 additions & 1 deletion apps/dokploy/__test__/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,14 @@ import { defineConfig } from "vitest/config";
export default defineConfig({
test: {
include: ["__test__/**/*.test.ts"], // Incluir solo los archivos de test en el directorio __test__
exclude: ["**/node_modules/**", "**/dist/**", "**/.docker/**"],
exclude: [
"**/node_modules/**",
"**/dist/**",
"**/.docker/**",
// Real-integration test: clones an examples repo + builds with Docker.
// Not run in CI (no examples repo on the fork); run it manually.
"**/deploy/application.real.test.ts",
],
pool: "forks",
setupFiles: [path.resolve(__dirname, "setup.ts")],
},
Expand Down
52 changes: 49 additions & 3 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,51 @@ run_container nomploy-postgres \
run_container nomploy-redis \
-v nomploy-redis:/data -p 127.0.0.1:6379:6379 redis:7

# ── Traefik (ingress via Consul Catalog) ─────────────────────────────────────
# Discovers deployed Nomad services from Consul (each carries traefik.* tags) and
# routes HTTP/HTTPS to them. Mirrors the app's initializeTraefikNomad().
TRAEFIK_DIR="/etc/nomploy/traefik"
$SUDO mkdir -p "$TRAEFIK_DIR/dynamic"
$SUDO tee "$TRAEFIK_DIR/traefik.yml" >/dev/null <<'TRAEFIKYML'
entryPoints:
web:
address: ":80"
websecure:
address: ":443"

providers:
consulCatalog:
endpoint:
address: "http://127.0.0.1:8500"
exposedByDefault: false
prefix: traefik

api:
insecure: true
dashboard: true

certificatesResolvers:
letsencrypt:
acme:
email: admin@localhost
storage: /etc/traefik/acme.json
httpChallenge:
entryPoint: web
TRAEFIKYML

if [ ! -f "$TRAEFIK_DIR/acme.json" ]; then
$SUDO touch "$TRAEFIK_DIR/acme.json"
$SUDO chmod 600 "$TRAEFIK_DIR/acme.json"
fi

echo "==> Starting Traefik"
run_container nomploy-traefik \
--network host \
-v "$TRAEFIK_DIR/traefik.yml:/etc/traefik/traefik.yml:ro" \
-v "$TRAEFIK_DIR/acme.json:/etc/traefik/acme.json" \
-v "$TRAEFIK_DIR/dynamic:/etc/nomploy/traefik/dynamic" \
traefik:v3.0

# ── nomploy app ───────────────────────────────────────────────────────────────
echo "==> Starting nomploy ($NOMPLOY_IMAGE)"
$SUDO docker pull "$NOMPLOY_IMAGE"
Expand All @@ -189,7 +234,8 @@ IP="$(hostname -I 2>/dev/null | awk '{print $1}')"
echo ""
echo "=============================================="
echo " nomploy is starting."
echo " Open: http://${IP:-<server-ip>}:${NOMPLOY_PORT}"
echo " Nomad: http://${IP:-<server-ip>}:4646"
echo " Consul: http://${IP:-<server-ip>}:8500"
echo " Open: http://${IP:-<server-ip>}:${NOMPLOY_PORT}"
echo " Ingress: Traefik on :80 / :443 (dashboard :8080)"
echo " Nomad: http://${IP:-<server-ip>}:4646"
echo " Consul: http://${IP:-<server-ip>}:8500"
echo "=============================================="
2 changes: 1 addition & 1 deletion packages/server/src/utils/builders/compose.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Compose Type: ${composeType} ✅`;

${compose.isolatedDeployment ? `docker network inspect ${compose.appName} >/dev/null 2>&1 || docker network create ${compose.composeType === "stack" ? "--driver overlay" : ""} --attachable ${compose.appName}` : ""}
${exportEnvCommand}
docker ${command.split(" ").join(" ")} 2>&1 || { echo "Error: ❌ Docker command failed"; exit 1; }
env -i PATH="$PATH" HOME="$HOME" docker ${command.split(" ").join(" ")} 2>&1 || { echo "Error: ❌ Docker command failed"; exit 1; }
${compose.isolatedDeployment ? `docker network connect ${compose.appName} $(docker ps --filter "name=nomploy-traefik" -q) >/dev/null 2>&1` : ""}

echo "Docker Compose Deployed: ✅";
Expand Down
Loading