Docker: introduce docker-compose setup and simplify CMD

- Replaced ENTRYPOINT/CMD with a single CMD ["infinito --help"] in Dockerfile
- Added docker-compose.yml with service 'infinito', port bindings, volumes, networks
- Added env.sample for BIND_IP, SUBNET, GATEWAY defaults

See conversation: https://chatgpt.com/share/68cda4d5-1fe0-800f-a7f7-191cb8b70d84
This commit is contained in:
2025-09-19 21:22:45 +02:00
parent 1c7152ceb2
commit 0168167769
3 changed files with 64 additions and 3 deletions

View File

@@ -64,6 +64,4 @@ RUN INFINITO_PATH=$(pkgmgr path infinito) && \
#RUN INFINITO_PATH=$(pkgmgr path infinito) && \
# cd "$INFINITO_PATH" && \
# make test
ENTRYPOINT ["infinito"]
CMD ["--help"]
CMD ["infinito --help"]

60
docker-compose.yml Normal file
View File

@@ -0,0 +1,60 @@
version: "3.9"
services:
infinito:
build:
context: .
dockerfile: Dockerfile
network: host
pull_policy: never
container_name: infinito_nexus
restart: unless-stopped
command: tail -f /dev/null
volumes:
- data:/var/lib/docker/volumes/
- backups:/Backups/
- letsencrypt:/etc/letsencrypt/
ports:
# --- Mail services (classic + secure) ---
- "${BIND_IP:-127.0.0.1}:25:25" # SMTP
- "${BIND_IP:-127.0.0.1}:110:110" # POP3
- "${BIND_IP:-127.0.0.1}:143:143" # IMAP
- "${BIND_IP:-127.0.0.1}:465:465" # SMTPS
- "${BIND_IP:-127.0.0.1}:587:587" # Submission (SMTP)
- "${BIND_IP:-127.0.0.1}:993:993" # IMAPS (bound to public IP)
- "${BIND_IP:-127.0.0.1}:995:995" # POP3S
- "${BIND_IP:-127.0.0.1}:4190:4190" # Sieve (ManageSieve)
# --- Web / API services ---
- "${BIND_IP:-127.0.0.1}:80:80" # HTTP
- "${BIND_IP:-127.0.0.1}:443:443" # HTTPS
- "${BIND_IP:-127.0.0.1}:8448:8448" # Matrix federation port
# --- TURN / STUN (UDP + TCP) ---
- "${BIND_IP:-127.0.0.1}:3478-3480:3478-3480/udp" # TURN/STUN UDP
- "${BIND_IP:-127.0.0.1}:3478-3480:3478-3480" # TURN/STUN TCP
# --- Streaming / RTMP ---
- "${BIND_IP:-127.0.0.1}:1935:1935" # Peertube
# --- Custom / application ports ---
- "${BIND_IP:-127.0.0.1}:2201:2201" # Gitea
- "${BIND_IP:-127.0.0.1}:2202:2202" # Gitlab
- "${BIND_IP:-127.0.0.1}:2203:22" # SSH
- "${BIND_IP:-127.0.0.1}:33552:33552"
# --- Consecutive ranges ---
- "${BIND_IP:-127.0.0.1}:48081-48083:48081-48083"
- "${BIND_IP:-127.0.0.1}:48087:48087"
volumes:
data:
backups:
letsencrypt:
networks:
default:
driver: bridge
ipam:
driver: default
config:
- subnet: ${SUBNET:-172.30.0.0/24}
gateway: ${GATEWAY:-172.30.0.1}

3
env.sample Normal file
View File

@@ -0,0 +1,3 @@
BIND_IP=127.0.0.1
SUBNET=172.30.0.0/24
GATEWAY=172.30.0.1