Files
Carbon/docker-compose.yml
Azreyo 1b83097f00 Refactor logging system and enhance Dockerfile configuration
- Introduced a new logging system with configurable log levels and categories.
- Added support for different log formats: plain text, JSON, and syslog.
- Updated Dockerfile to use Alpine 3.19 and improved build process.
- Enhanced server configuration to replace verbose logging with log modes (off, classic, debug, advanced).
- Improved security measures in SSL context configuration.
- Added health checks and resource limits in docker-compose.yml.
- Refactored Makefile to include new logging source files.
- Updated server configuration to set default log file path and SSL certificate paths.
- Enhanced performance tracking and logging capabilities.
- Added hex dump utility for debugging binary data.
2025-12-11 20:04:54 +01:00

51 lines
1.0 KiB
YAML

version: '3.8'
services:
carbon-server:
build:
context: .
dockerfile: Dockerfile
image: carbon:latest
container_name: carbon-http-server
ports:
- "8080:8080"
- "8443:8443"
environment:
- SERVER_NAME=0.0.0.0
- PORT=8080
- USE_HTTPS=false
- ENABLE_HTTP2=false
- ENABLE_WEBSOCKET=false
- MAX_THREADS=4
- MAX_CONNECTIONS=1024
- LOG_MODE=classic
volumes:
- ./www:/app/www:ro
- carbon-logs:/app/log
# For HTTPS, mount your certificates:
# - ./ssl/cert:/app/ssl/cert:ro
# - ./ssl/key:/app/ssl/key:ro
restart: unless-stopped
read_only: true
tmpfs:
- /tmp:size=64M
security_opt:
- no-new-privileges:true
cap_drop:
- ALL
networks:
- carbon-net
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:8080/"]
interval: 30s
timeout: 10s
retries: 3
start_period: 10s
networks:
carbon-net:
driver: bridge
volumes:
carbon-logs: