Skip to main content
Glama
docker-compose-prod.ts2.03 kB
/** * Docker Compose Production Template * Multi-service deployment with PostgreSQL, Redis, and app */ // docker-compose.yml `version: '3.8' services: app: build: context: . dockerfile: Dockerfile container_name: app restart: unless-stopped ports: - "\${PORT:-3000}:3000" environment: - NODE_ENV=production - DATABASE_URL=postgresql://postgres:\${POSTGRES_PASSWORD}@db:5432/\${POSTGRES_DB} - REDIS_URL=redis://redis:6379 depends_on: db: condition: service_healthy redis: condition: service_started networks: - app-network healthcheck: test: ["CMD", "curl", "-f", "http://localhost:3000/health"] interval: 30s timeout: 10s retries: 3 start_period: 40s db: image: postgres:16-alpine container_name: db restart: unless-stopped environment: POSTGRES_USER: postgres POSTGRES_PASSWORD: \${POSTGRES_PASSWORD} POSTGRES_DB: \${POSTGRES_DB} volumes: - postgres-data:/var/lib/postgresql/data - ./init.sql:/docker-entrypoint-initdb.d/init.sql:ro ports: - "5432:5432" networks: - app-network healthcheck: test: ["CMD-SHELL", "pg_isready -U postgres"] interval: 10s timeout: 5s retries: 5 redis: image: redis:7-alpine container_name: redis restart: unless-stopped command: redis-server --appendonly yes volumes: - redis-data:/data ports: - "6379:6379" networks: - app-network nginx: image: nginx:alpine container_name: nginx restart: unless-stopped ports: - "80:80" - "443:443" volumes: - ./nginx.conf:/etc/nginx/nginx.conf:ro - ./certs:/etc/nginx/certs:ro depends_on: - app networks: - app-network volumes: postgres-data: redis-data: networks: app-network: driver: bridge`; // .env.example `POSTGRES_PASSWORD=your-secure-password POSTGRES_DB=myapp PORT=3000`; export {};

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/millsydotdev/Code-MCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server