add docker

This commit is contained in:
2025-11-23 02:07:26 -06:00
parent 389e8de3aa
commit d7a49e6ef3
2 changed files with 47 additions and 0 deletions

35
Dockerfile Normal file
View File

@@ -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"]

12
docker-compose.yml Normal file
View File

@@ -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