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
9 changes: 9 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,15 @@ ENV NODE_ENV=production

RUN apt-get update && apt-get install -y curl unzip zip apache2-utils iproute2 rsync git-lfs && git lfs install && rm -rf /var/lib/apt/lists/*

# Nomad CLI — the deploy pipeline runs `nomad job run` to submit jobs to the
# control plane's own Nomad. (Remote-server deploys use that server's own CLI.)
ARG TARGETARCH
ARG NOMAD_VERSION=2.0.5
RUN curl -fsSL "https://releases.hashicorp.com/nomad/${NOMAD_VERSION}/nomad_${NOMAD_VERSION}_linux_${TARGETARCH}.zip" -o /tmp/nomad.zip \
&& unzip -o /tmp/nomad.zip -d /usr/local/bin/ \
&& rm /tmp/nomad.zip \
&& nomad --version

# Copy only the necessary files
COPY --from=build /prod/nomploy/.next ./.next
COPY --from=build /prod/nomploy/dist ./dist
Expand Down
7 changes: 7 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,13 @@ plugin "docker" {
}
NOMADHCL

# The Nomad docker plugin above sets auth.config = /root/.docker/config.json.
# If that file is missing, the docker driver fails to pull EVERY image (even
# public ones). Create an empty auth config so public pulls work; `docker login`
# later fills it in for private registries. Must exist before Nomad starts.
$SUDO mkdir -p /root/.docker
[ -s /root/.docker/config.json ] || echo '{"auths":{}}' | $SUDO tee /root/.docker/config.json >/dev/null

# Start via --no-block and poll the HTTP APIs for readiness. The packaged units
# are Type=notify; if the agent doesn't signal systemd, a blocking `restart`
# would hang and (under set -e) abort the install even though the agent is up.
Expand Down
6 changes: 6 additions & 0 deletions packages/server/src/setup/nomad-bootstrap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,12 @@ plugin "docker" {
}
NOMADHCL

# The docker plugin's auth.config points at /root/.docker/config.json; if it's
# missing the driver fails to pull ANY image (even public). Create an empty auth
# config (docker login later fills it for private registries). Before start.
$SUDO mkdir -p /root/.docker
[ -s /root/.docker/config.json ] || echo '{"auths":{}}' | $SUDO tee /root/.docker/config.json >/dev/null

# ── Enable + start services ───────────────────────────────────────────────
echo "==> Starting Consul and Nomad"
$SUDO systemctl enable consul nomad
Expand Down
Loading