초기 홈 관리 시스템 API 구현
- Express.js 기반 백엔드 API 서버 - MariaDB, Redis, phpMyAdmin Docker 환경 - Device 관리 기본 CRUD 구현 - Mac Mini M4 Pro 전용 설정 및 배포 스크립트 - 자동화된 설치 및 배포 시스템 - 완전한 문서화 및 실행 가이드
This commit is contained in:
53
config/mariadb.cnf
Normal file
53
config/mariadb.cnf
Normal file
@@ -0,0 +1,53 @@
|
||||
[mariadb]
|
||||
# 기본 설정
|
||||
character-set-server = utf8mb4
|
||||
collation-server = utf8mb4_unicode_ci
|
||||
init-connect = 'SET NAMES utf8mb4'
|
||||
|
||||
# 메모리 최적화 (개발 환경용)
|
||||
innodb_buffer_pool_size = 1G
|
||||
innodb_log_buffer_size = 32M
|
||||
innodb_log_file_size = 256M
|
||||
key_buffer_size = 128M
|
||||
sort_buffer_size = 2M
|
||||
read_buffer_size = 1M
|
||||
read_rnd_buffer_size = 4M
|
||||
thread_cache_size = 25
|
||||
table_open_cache = 2000
|
||||
|
||||
# 연결 설정
|
||||
max_connections = 100
|
||||
max_user_connections = 90
|
||||
wait_timeout = 600
|
||||
interactive_timeout = 600
|
||||
|
||||
# 쿼리 캐시
|
||||
query_cache_type = 1
|
||||
query_cache_size = 128M
|
||||
query_cache_limit = 1M
|
||||
|
||||
# InnoDB 최적화
|
||||
innodb_flush_log_at_trx_commit = 2
|
||||
innodb_flush_method = O_DIRECT
|
||||
innodb_file_per_table = 1
|
||||
innodb_io_capacity = 1000
|
||||
innodb_io_capacity_max = 2000
|
||||
innodb_read_io_threads = 2
|
||||
innodb_write_io_threads = 2
|
||||
|
||||
# 시계열 데이터 최적화
|
||||
innodb_compression_default = ON
|
||||
innodb_page_compression = ON
|
||||
innodb_adaptive_hash_index = ON
|
||||
|
||||
# 로깅
|
||||
general_log = OFF
|
||||
slow_query_log = ON
|
||||
slow_query_log_file = /var/log/mysql/slow.log
|
||||
long_query_time = 2
|
||||
|
||||
# 바이너리 로그 (백업/복제용)
|
||||
log_bin = mysql-bin
|
||||
binlog_format = ROW
|
||||
expire_logs_days = 7
|
||||
max_binlog_size = 100M
|
||||
52
config/redis.conf
Normal file
52
config/redis.conf
Normal file
@@ -0,0 +1,52 @@
|
||||
# Redis 기본 설정
|
||||
bind 0.0.0.0
|
||||
port 6379
|
||||
timeout 300
|
||||
tcp-keepalive 60
|
||||
|
||||
# 메모리 설정
|
||||
maxmemory 512mb
|
||||
maxmemory-policy allkeys-lru
|
||||
|
||||
# 스냅샷 설정
|
||||
save 900 1
|
||||
save 300 10
|
||||
save 60 10000
|
||||
|
||||
# 로그 설정
|
||||
loglevel notice
|
||||
logfile ""
|
||||
|
||||
# 데이터베이스 설정
|
||||
databases 16
|
||||
|
||||
# AOF 설정
|
||||
appendonly yes
|
||||
appendfsync everysec
|
||||
no-appendfsync-on-rewrite no
|
||||
auto-aof-rewrite-percentage 100
|
||||
auto-aof-rewrite-min-size 64mb
|
||||
|
||||
# 슬로우 로그
|
||||
slowlog-log-slower-than 10000
|
||||
slowlog-max-len 128
|
||||
|
||||
# 클라이언트 연결 설정
|
||||
tcp-backlog 511
|
||||
timeout 0
|
||||
tcp-keepalive 300
|
||||
|
||||
# 보안 설정 (개발환경)
|
||||
# requirepass your-redis-password
|
||||
|
||||
# 기타 최적화
|
||||
hash-max-ziplist-entries 512
|
||||
hash-max-ziplist-value 64
|
||||
list-max-ziplist-size -2
|
||||
list-compress-depth 0
|
||||
set-max-intset-entries 512
|
||||
zset-max-ziplist-entries 128
|
||||
zset-max-ziplist-value 64
|
||||
hll-sparse-max-bytes 3000
|
||||
stream-node-max-bytes 4096
|
||||
stream-node-max-entries 100
|
||||
Reference in New Issue
Block a user