mirror of
https://github.com/Sudo-Ivan/thechatroom.git
synced 2025-12-22 13:37:10 +00:00
add docker
This commit is contained in:
35
Dockerfile
Normal file
35
Dockerfile
Normal 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
12
docker-compose.yml
Normal 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
|
||||
Reference in New Issue
Block a user