diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..28833dd --- /dev/null +++ b/Dockerfile @@ -0,0 +1,35 @@ +FROM python:3.13-alpine + +RUN apk add --no-cache \ + gcc \ + musl-dev \ + linux-headers \ + && pip install --no-cache-dir \ + pytz \ + requests \ + geopy \ + nomadnet \ + && apk del gcc musl-dev linux-headers + +WORKDIR /app + +COPY nomadnetwork/ ./nomadnetwork/ + +RUN chmod +x ./nomadnetwork/storage/pages/nomadnet.mu \ + && chmod +x ./nomadnetwork/storage/pages/meshchat.mu \ + && chmod +x ./nomadnetwork/storage/pages/fullchat.mu \ + && chmod +x ./nomadnetwork/storage/pages/last100.mu + +RUN addgroup -g 1000 appuser && \ + adduser -D -u 1000 -G appuser appuser + +COPY .reticulum/ /home/appuser/.reticulum/ + +RUN chown -R appuser:appuser /app /home/appuser/.reticulum + +USER appuser + +EXPOSE 4242 + +CMD ["nomadnet", "-d", "--config", "./nomadnetwork"] + diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..59c08f9 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,12 @@ +services: + thechatroom: + build: . + container_name: thechatroom + user: "1000:1000" + network_mode: host + security_opt: + - no-new-privileges:true +# volumes: +# - ./nomadnetwork:/app/nomadnetwork +# - ./.reticulum:/home/appuser/.reticulum + restart: unless-stopped \ No newline at end of file