Added default exposure of non-encrypted http port.

This commit is contained in:
Daan Selen 2025-05-19 12:14:46 +02:00
parent 5223cbd619
commit 5d18a1ad71
2 changed files with 23 additions and 2 deletions

View File

@ -165,8 +165,8 @@ COPY --from=builder /opt/meshcentral/meshcentral /opt/meshcentral/meshcentral
# install dependencies from package.json # install dependencies from package.json
RUN cd meshcentral && npm install RUN cd meshcentral && npm install
# Expose only 443 by default to reduce attack surface. (Only encrypted ports). # Expose needed ports
EXPOSE 443 EXPOSE 80 443
# These volumes will be created by default even without any declaration, this allows default persistence in Docker/Podman. # These volumes will be created by default even without any declaration, this allows default persistence in Docker/Podman.

21
docker/compose.yaml Normal file
View File

@ -0,0 +1,21 @@
services:
meshcentral:
image: ghcr.io/ylianst/meshcentral:latest
environment:
- HOSTNAME=myserver.domain.com
- ALLOW_NEW_ACCOUNTS=false
- USE_MONGODB=true
- MONGO_URL=mongodb://username:password@mongodb:27017/meshcentral
volumes:
- meshcentral-data:/opt/meshcentral/meshcentral-data
- meshcentral-files:/opt/meshcentral/meshcentral-files
- meshcentral-web:/opt/meshcentral/meshcentral-web
- meshcentral-backups:/opt/meshcentral/meshcentral-backups
ports:
- "80:80"
- "443:443"
volumes:
meshcentral-data:
meshcentral-files:
meshcentral-web:
meshcentral-backups: