refactor: [docker] tenant 저장소를 shared-storage에서 mng/storage/app/tenants로 변경
- docker-compose: shared-storage 볼륨 마운트 제거 - entrypoint: storage/app/tenants 디렉토리 생성으로 변경 - nginx: tenant-storage alias 경로 변경
This commit is contained in:
@@ -85,7 +85,7 @@ services:
|
||||
- ./mysql/client-skip-ssl.cnf:/etc/mysql/conf.d/disable-ssl.cnf:ro
|
||||
- ../sales/apikey:/var/www/sales/apikey:ro # Google 서비스 계정 파일 접근용
|
||||
- ../sales:/var/www/sales-docs:ro # 영업 PPTX 문서 접근용
|
||||
- ../shared-storage:/var/www/shared-storage # 테넌트 파일 공유 스토리지
|
||||
# shared-storage 제거됨 → mng/storage/app/tenants 로 이동 (2026-02-23)
|
||||
- ../docs:/var/www/docs:ro # SAM 프로젝트 문서 (RAG 검색용)
|
||||
environment:
|
||||
- DB_HOST=sam-mysql-1
|
||||
|
||||
19
sam/docker/mng/entrypoint.sh
Executable file
19
sam/docker/mng/entrypoint.sh
Executable file
@@ -0,0 +1,19 @@
|
||||
#!/bin/bash
|
||||
|
||||
# 0. Nginx 기본 사이트 설정 비활성화 (충돌 방지)
|
||||
rm -f /etc/nginx/sites-enabled/default
|
||||
|
||||
# 1. 퍼미션 설정 (mng)
|
||||
chown -R www-data:www-data /var/www/mng/storage /var/www/mng/bootstrap/cache
|
||||
chmod -R 775 /var/www/mng/storage /var/www/mng/bootstrap/cache
|
||||
|
||||
# 2. tenant storage 퍼미션 (명함/신분증/통장/게시판 첨부파일 등)
|
||||
mkdir -p /var/www/mng/storage/app/tenants
|
||||
chown -R www-data:www-data /var/www/mng/storage/app/tenants
|
||||
chmod -R 775 /var/www/mng/storage/app/tenants
|
||||
|
||||
# 3. storage:link (실패해도 무시)
|
||||
cd /var/www/mng && php artisan storage:link || true
|
||||
|
||||
# 4. supervisor 실행(nginx+php-fpm)
|
||||
exec /usr/bin/supervisord
|
||||
32
sam/docker/mng/nginx.conf
Executable file
32
sam/docker/mng/nginx.conf
Executable file
@@ -0,0 +1,32 @@
|
||||
server {
|
||||
listen 80;
|
||||
server_name _;
|
||||
|
||||
root /var/www/mng/public;
|
||||
index index.php index.html;
|
||||
|
||||
access_log /var/log/nginx/mng_access.log;
|
||||
error_log /var/log/nginx/mng_error.log;
|
||||
|
||||
# 심볼릭 링크 허용
|
||||
disable_symlinks off;
|
||||
|
||||
# tenant-storage 정적 파일 서빙
|
||||
location /tenant-storage/ {
|
||||
alias /var/www/mng/storage/app/tenants/;
|
||||
expires 7d;
|
||||
add_header Cache-Control "public, immutable";
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$query_string;
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
fastcgi_pass 127.0.0.1:9000;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
include fastcgi_params;
|
||||
fastcgi_read_timeout 300s;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user