**Load Balancer (HAProxy)**, **Cache (Redis)** , **multiple Node.js** , **PM2**
1.4K
Bu Docker imajı, optimize edilmiş All-in-One bir çalışma ortamıdır. Tek bir konteyner içerisinde Load Balancer (HAProxy), Cache (Redis) ve multiple Node.js uygulamalarını PM2 güvencesiyle çalıştırır.
Europe/Istanbul (tzdata) yüklü gelir.Bu imajı kullanmak için sunucunuzda aşağıdaki yapılandırmayı hazırlamanız yeterlidir.
docker-compose.yml Hazırlığıservices:
service-auth:
image: ersandoru/service_auth:1.0.0
container_name: service-auth-apps
restart: unless-stopped
ports:
- "80:80" # HTTP
- "443:443" # HTTPS
- "85:85" # Ek Portlar
- "88:88"
volumes:
- /var/www:/var/www
- ./ecosystem.config.js:/var/www/ecosystem.config.js
- ./haproxy.cfg:/usr/local/etc/haproxy/haproxy.cfg:ro
- /etc/httpd/ssl/myappcom:/usr/local/etc/haproxy/certs:ro
- redis_data:/data
environment:
- TZ=Europe/Istanbul
volumes:
redis_data:
HAProxy, .crt ve .key dosyalarının tek bir .pem dosyasında birleştirilmesini bekler. Sunucunuzdaki sertifika klasöründe şu komutu çalıştırın:
cat domain.crt domain.key bundle.crt > /etc/httpd/ssl/myappcom/myappcom.pem
ecosystem.config.js)İmaj içerisinde hem Redis'i hem de HAProxy'i PM2 yönetmeliği için örnek yapı:
module.exports = {
apps: [
{ name: "redis-server", script: "redis-server", args: "--appendonly yes" },
{ name: "haproxy", script: "haproxy", args: "-f /usr/local/etc/haproxy/haproxy.cfg" },
{
name: "auth-service",
script: "/var/www/my-app/app.js",
instances: 1,
exec_mode: "cluster"
}
]
};
service_auth adıyla ilk kararlı sürüm. HAProxy, Redis ve Node 20 tek pakette toplandı.Content type
Image
Digest
sha256:3f40839db…
Size
71.6 MB
Last updated
6 months ago
docker pull ersandoru/service_auth