690419:1831 feat: update CI/CD to use SSH key authentication #05
This commit is contained in:
@@ -1,4 +1,12 @@
|
||||
# Per-stack .env.example — services (cache, search)
|
||||
# Source: ../../.env.template
|
||||
REDIS_PASSWORD=
|
||||
ELASTICSEARCH_PASSWORD=
|
||||
# --- Redis (Cache & Queue) ---
|
||||
REDIS_HOST=cache
|
||||
REDIS_PORT=6379
|
||||
REDIS_PASSWORD=redis3ac466bf9b6
|
||||
|
||||
# --- Search (Elasticsearch) ---
|
||||
ELASTICSEARCH_HOST=search
|
||||
ELASTICSEARCH_PORT=9200
|
||||
ELASTICSEARCH_USERNAME=elastic
|
||||
ELASTICSEARCH_PASSWORD=elasticed0bbde94
|
||||
|
||||
@@ -23,6 +23,7 @@ networks:
|
||||
lcbp3:
|
||||
external: true
|
||||
|
||||
name: lcbp3-services
|
||||
services:
|
||||
# ----------------------------------------------------------------
|
||||
# 1. Redis (Caching + Distributed Lock + BullMQ queues)
|
||||
@@ -30,13 +31,13 @@ services:
|
||||
# ----------------------------------------------------------------
|
||||
cache:
|
||||
<<: [*restart_policy, *default_logging]
|
||||
image: redis:7-alpine
|
||||
image: redis:7-alpine # ใช้ Alpine image เพื่อให้มีขน
|
||||
container_name: cache
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '1.0'
|
||||
memory: 2G
|
||||
memory: 2G # Redis เป็น in-memory, ให้ memory เพียงพอต่อการ
|
||||
reservations:
|
||||
cpus: '0.25'
|
||||
memory: 512M
|
||||
@@ -80,12 +81,12 @@ services:
|
||||
# ----------------------------------------------------------------
|
||||
search:
|
||||
<<: [*restart_policy, *default_logging]
|
||||
image: elasticsearch:8.11.1
|
||||
image: elasticsearch:8.11.1 # แนะนำให้ระบุเวอร์ชันชัดเจน
|
||||
container_name: search
|
||||
deploy:
|
||||
resources:
|
||||
limits:
|
||||
cpus: '2.0'
|
||||
cpus: '2.0' # Elasticsearch ใช้ CPU และ Memory ค่อนข้างห
|
||||
memory: 4G
|
||||
reservations:
|
||||
cpus: '0.5'
|
||||
@@ -100,7 +101,7 @@ services:
|
||||
# NOTE: หากเปิด xpack.security ต้องตั้ง ELASTIC_PASSWORD และอัปเดต backend client config
|
||||
# ค่าเริ่มต้น keep ปิดไว้เพราะ network เข้าถึงได้เฉพาะภายใน lcbp3 (ไม่มี host port)
|
||||
xpack.security.enabled: 'false'
|
||||
# --- Performance ---
|
||||
# --- Performance กำหนด Heap size (1GB) ให้เหมาะสมกับ memory limit (4G ---
|
||||
ES_JAVA_OPTS: '-Xms1g -Xmx1g'
|
||||
ulimits:
|
||||
memlock:
|
||||
|
||||
Reference in New Issue
Block a user