compose 안정화: mysql healthcheck 대기, adminer IPv4 리슨 및 내부 바인딩
Deploy / deploy (push) Successful in 20s
Deploy / deploy (push) Successful in 20s
- backend가 mysql 초기화 완료(healthy) 후에 기동하도록 depends_on 조건 추가 - adminer: IPv6 비활성 호스트에서 리슨 실패하던 것을 0.0.0.0 리슨으로 수정, 포트를 127.0.0.1로 바인딩해 외부 노출 차단 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
+12
-2
@@ -12,13 +12,22 @@ services:
|
||||
- mysql-data:/var/lib/mysql
|
||||
networks:
|
||||
- report-network
|
||||
healthcheck:
|
||||
test: ["CMD", "mysqladmin", "ping", "-h", "127.0.0.1"]
|
||||
interval: 5s
|
||||
timeout: 5s
|
||||
retries: 20
|
||||
start_period: 30s
|
||||
|
||||
adminer:
|
||||
image: adminer
|
||||
container_name: adminer
|
||||
restart: always
|
||||
# IPv6 비활성 호스트에서 기본 [::]:8080 리슨이 실패하므로 IPv4로 지정
|
||||
command: ["php", "-S", "0.0.0.0:8080", "-t", "/var/www/html"]
|
||||
ports:
|
||||
- "8083:8080"
|
||||
# DB 관리툴은 서버 내부에서만 접근 (외부 접근은 SSH 터널 사용)
|
||||
- "127.0.0.1:8083:8080"
|
||||
depends_on:
|
||||
- mysql
|
||||
networks:
|
||||
@@ -41,7 +50,8 @@ services:
|
||||
- ADMIN_PASS=${ADMIN_PASS:-kyeongmi}
|
||||
- JEMINI_KEY=${JEMINI_KEY}
|
||||
depends_on:
|
||||
- mysql
|
||||
mysql:
|
||||
condition: service_healthy
|
||||
volumes:
|
||||
- ./backend/img:/app/img
|
||||
networks:
|
||||
|
||||
Reference in New Issue
Block a user