Files
NageshbansalandGitHub 1b372d89be feat: introduce signoz-standalone and fix systemdcasting (#80)
#### Features   
- Add standalone Docker image (docs/standalone/): single container
running all SigNoz components via systemd
  casting
- Add SQLite metastore support in systemd casting (enricher, signoz
molding, forge, cast)
- Add Restart=on-failure with RestartSec=5 to migrator, ingester, and
signoz service templates to remove job readiness checks with
`After`/`Wants`/`Requires`
#### Fixes
                                                                     
- Enable all services before starting any (fixes Unit not found during
start)
- Use --no-block for systemctl start (prevents cast from blocking on
oneshot services)
 #### Refactors                                                 
- Remove inter-service dependency coupling (After=/Requires=/Wants=)
from all service templates; services manage their own readiness via
restart policies and readiness checks
- Move config material paths from configs/<component>/ to
<component>/<kind>/
- Move IsEnabled() checks to forgeCasting dispatcher instead of
individual forge methods
- Simplify discoverAndPrepareServices and startAllService, remove
service categorization map
- Render environment variables (Spec.Env) and ClickHouse DSN in
ingester, migrator, and telemetrystore templates
Related: https://github.com/SigNoz/platform-pod/issues/1522
2026-03-26 23:51:57 +05:30

75 lines
2.8 KiB
Docker

ARG DEBIAN_SHA="pass-a-valid-docker-sha-otherwise-this-will-fail"
FROM debian@sha256:${DEBIAN_SHA}
LABEL maintainer="signoz"
ARG OS="linux"
ARG ARCH
ARG SIGNOZ_VERSION=latest
ARG INGESTER_VERSION=latest
ARG FOUNDRY_VERSION=latest
# Install systemd
RUN apt-get update && apt-get install -y --no-install-recommends \
systemd \
systemd-sysv \
ca-certificates \
curl \
tar \
gnupg && \
rm -f /lib/systemd/system/multi-user.target.wants/* \
/etc/systemd/system/*.wants/* \
/lib/systemd/system/local-fs.target.wants/* \
/lib/systemd/system/sockets.target.wants/*udev* \
/lib/systemd/system/sockets.target.wants/*initctl* \
/lib/systemd/system/sysinit.target.wants/systemd-tmpfiles-setup* \
/lib/systemd/system/systemd-update-utmp*
# SigNoz
RUN mkdir -p /opt/signoz && \
curl -fsSL "https://github.com/SigNoz/signoz/releases/${SIGNOZ_VERSION}/download/signoz_${OS}_${ARCH}.tar.gz" | \
tar -xz --strip-components=1 -C /opt/signoz && \
chmod +x /opt/signoz/bin/signoz
# OTel Collector (ingester)
RUN mkdir -p /opt/ingester && \
curl -fsSL "https://github.com/SigNoz/signoz-otel-collector/releases/${INGESTER_VERSION}/download/signoz-otel-collector_${OS}_${ARCH}.tar.gz" | \
tar -xz --strip-components=1 -C /opt/ingester && \
chmod +x /opt/ingester/bin/signoz-otel-collector
# Foundry
RUN mkdir -p /usr/local/bin && \
curl -fsSL "https://github.com/SigNoz/foundry/releases/${FOUNDRY_VERSION}/download/foundry_${OS}_${ARCH}.tar.gz" | \
tar -xz --strip-components=1 -C /tmp && \
mv /tmp/bin/foundryctl /usr/local/bin/foundryctl && \
chmod +x /usr/local/bin/foundryctl
# Install ClickHouse from apt repo
RUN curl -fsSL 'https://packages.clickhouse.com/rpm/lts/repodata/repomd.xml.key' | \
gpg --dearmor -o /usr/share/keyrings/clickhouse-keyring.gpg && \
echo "deb [signed-by=/usr/share/keyrings/clickhouse-keyring.gpg] https://packages.clickhouse.com/deb stable main" \
> /etc/apt/sources.list.d/clickhouse.list && \
apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
clickhouse-server \
clickhouse-client && \
systemctl disable clickhouse-server || true
RUN apt-get clean && rm -rf /var/lib/apt/lists/*
RUN useradd -r -m -d /opt/signoz -s /bin/false signoz && \
mkdir -p /var/lib/signoz /var/lib/ingester /etc/foundry /opt/signoz/web && \
chown signoz:signoz /var/lib/signoz /var/lib/ingester /opt/signoz
COPY docs/standalone/casting.yaml /etc/foundry/casting.yaml
COPY docs/standalone/foundry-setup.service /etc/systemd/system/foundry-setup.service
RUN mkdir -p /var/lib/foundry && systemctl enable foundry-setup.service
EXPOSE 8080 4317 4318
VOLUME ["/var/lib/clickhouse", "/var/lib/signoz"]
STOPSIGNAL SIGRTMIN+3
CMD ["/sbin/init"]