Develop (#9)
* Refactor carbon-server service in docker-compose.yml to use pre-built image and remove unnecessary build context and volume mounts * Enhance performance and security features: - Update compiler flags for better optimization and security. - Implement MIME type caching for improved response handling. - Introduce worker thread pool for efficient connection management. - Optimize socket settings for low latency and enhanced performance. - Add support for CPU affinity in worker threads. - Implement graceful shutdown for worker threads during cleanup.
This commit is contained in:
@@ -2,24 +2,14 @@ version: '3.8'
|
||||
|
||||
services:
|
||||
carbon-server:
|
||||
build:
|
||||
context: .
|
||||
dockerfile: Dockerfile
|
||||
image: azreyo/carbon:latest
|
||||
container_name: carbon-http-server
|
||||
ports:
|
||||
- "8080:8080" # HTTP port
|
||||
- "8443:8443" # HTTPS port
|
||||
volumes:
|
||||
# Mount www directory for easy content updates
|
||||
- ./www:/app/www:ro
|
||||
# Mount log directory to persist logs
|
||||
- ./log:/app/log
|
||||
# Mount SSL certificates if using HTTPS
|
||||
- ./ssl:/app/ssl:ro
|
||||
# Mount config file
|
||||
- ./server.conf:/app/server.conf:ro
|
||||
environment:
|
||||
- TZ=UTC
|
||||
- SERVER_NAME=yourdomain.com # Change this to your domain or IP
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- carbon-net
|
||||
@@ -42,6 +32,7 @@ services:
|
||||
read_only: true
|
||||
tmpfs:
|
||||
- /tmp
|
||||
- /app/log
|
||||
|
||||
networks:
|
||||
carbon-net:
|
||||
|
||||
Reference in New Issue
Block a user