oracle-server stack
This commit is contained in:
22
.gitignore
vendored
Normal file
22
.gitignore
vendored
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
# 데이터 디렉토리 (DB 데이터, n8n 작업물 등)
|
||||||
|
**/data/
|
||||||
|
**/files/
|
||||||
|
**/binaryData/
|
||||||
|
**/node_modules/
|
||||||
|
|
||||||
|
# 보안 및 인증서
|
||||||
|
**/.env
|
||||||
|
**/secrets/
|
||||||
|
**/letsencrypt/
|
||||||
|
**/*.pem
|
||||||
|
**/*.key
|
||||||
|
**/.runner
|
||||||
|
|
||||||
|
# 시스템 로그
|
||||||
|
**/*.log
|
||||||
|
**/*.journal
|
||||||
|
|
||||||
|
# OS 관련
|
||||||
|
.DS_Store
|
||||||
|
Thumbs.db
|
||||||
|
|
||||||
65
docker-compose.yml
Normal file
65
docker-compose.yml
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
services:
|
||||||
|
php-app:
|
||||||
|
image: nkey01/laravel-wms:1.0.0
|
||||||
|
container_name: php-app
|
||||||
|
restart: unless-stopped
|
||||||
|
env_file:
|
||||||
|
- .env
|
||||||
|
- ./wms/.env
|
||||||
|
depends_on:
|
||||||
|
- postgres
|
||||||
|
volumes:
|
||||||
|
- laravel_public:/var/www/html/public # public을 볼륨으로 뽑아서 nginx와 공유
|
||||||
|
|
||||||
|
nginx:
|
||||||
|
image: nginx:1.27-alpine
|
||||||
|
container_name: nginx
|
||||||
|
restart: unless-stopped
|
||||||
|
ports:
|
||||||
|
- "80:80"
|
||||||
|
volumes:
|
||||||
|
- ./nginx/conf.d:/etc/nginx/conf.d:ro
|
||||||
|
- laravel_public:/var/www/html/public:ro
|
||||||
|
depends_on:
|
||||||
|
- php-app
|
||||||
|
- n8n
|
||||||
|
|
||||||
|
n8n:
|
||||||
|
image: n8nio/n8n:latest
|
||||||
|
container_name: n8n
|
||||||
|
restart: unless-stopped
|
||||||
|
ports:
|
||||||
|
- "5678:5678"
|
||||||
|
env_file:
|
||||||
|
- .env
|
||||||
|
- ./n8n/.env
|
||||||
|
environment:
|
||||||
|
- DB_TYPE=postgresdb
|
||||||
|
- DB_POSTGRESDB_HOST=postgres
|
||||||
|
- DB_POSTGRESDB_PORT=5432
|
||||||
|
- DB_POSTGRESDB_DATABASE=${POSTGRES_DB}
|
||||||
|
- DB_POSTGRESDB_USER=${POSTGRES_USER}
|
||||||
|
- DB_POSTGRESDB_PASSWORD=${POSTGRES_PASSWORD}
|
||||||
|
- N8N_PATH=/n8n/
|
||||||
|
- N8N_EDITOR_BASE_URL=${BASE_URL}
|
||||||
|
volumes:
|
||||||
|
- ./n8n/data:/home/node/.n8n
|
||||||
|
- ./n8n/files:/files
|
||||||
|
depends_on:
|
||||||
|
- postgres
|
||||||
|
|
||||||
|
postgres:
|
||||||
|
image: postgres:15
|
||||||
|
container_name: postgres
|
||||||
|
restart: unless-stopped
|
||||||
|
ports:
|
||||||
|
- "5432:5432"
|
||||||
|
env_file:
|
||||||
|
- .env
|
||||||
|
volumes:
|
||||||
|
- pgdata:/var/lib/postgresql/data
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
pgdata:
|
||||||
|
laravel_public:
|
||||||
|
|
||||||
64
nginx/conf.d/custom.conf
Normal file
64
nginx/conf.d/custom.conf
Normal file
@@ -0,0 +1,64 @@
|
|||||||
|
upstream php_fpm {
|
||||||
|
server php-app:9000;
|
||||||
|
}
|
||||||
|
|
||||||
|
upstream n8n_backend {
|
||||||
|
server n8n:5678;
|
||||||
|
}
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
server_name _;
|
||||||
|
|
||||||
|
root /var/www/html/public;
|
||||||
|
index index.php index.html;
|
||||||
|
|
||||||
|
# ===== 2) n8n - /n8n/ 경로로 분리 =====
|
||||||
|
# ^~ 를 붙여서, 이 location이 매치되면 정규식(~, ~*) location은 무시하게 만들기
|
||||||
|
location ^~ /n8n/ {
|
||||||
|
proxy_pass http://n8n_backend/;
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
|
||||||
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
|
proxy_set_header Connection "upgrade";
|
||||||
|
|
||||||
|
proxy_set_header Host $host;
|
||||||
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
|
||||||
|
proxy_read_timeout 600s;
|
||||||
|
proxy_send_timeout 600s;
|
||||||
|
}
|
||||||
|
|
||||||
|
# ===== 1) WMS (Laravel) - 루트로 사용 =====
|
||||||
|
location / {
|
||||||
|
try_files $uri $uri/ /index.php?$query_string;
|
||||||
|
}
|
||||||
|
|
||||||
|
location ~ \.php$ {
|
||||||
|
include fastcgi_params;
|
||||||
|
|
||||||
|
fastcgi_pass php_fpm;
|
||||||
|
fastcgi_index index.php;
|
||||||
|
|
||||||
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||||
|
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||||
|
|
||||||
|
fastcgi_read_timeout 600s;
|
||||||
|
fastcgi_send_timeout 600s;
|
||||||
|
}
|
||||||
|
|
||||||
|
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
|
||||||
|
try_files $uri $uri/ @laravel;
|
||||||
|
expires 30d;
|
||||||
|
access_log off;
|
||||||
|
}
|
||||||
|
|
||||||
|
location @laravel {
|
||||||
|
fastcgi_pass php_fpm;
|
||||||
|
fastcgi_param SCRIPT_FILENAME $document_root/index.php;
|
||||||
|
include fastcgi_params;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
Reference in New Issue
Block a user