infra: realestate-lab Docker/Nginx/배포 스크립트 통합
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -89,6 +89,25 @@ services:
|
|||||||
timeout: 5s
|
timeout: 5s
|
||||||
retries: 3
|
retries: 3
|
||||||
|
|
||||||
|
realestate-lab:
|
||||||
|
build:
|
||||||
|
context: ./realestate-lab
|
||||||
|
container_name: realestate-lab
|
||||||
|
restart: unless-stopped
|
||||||
|
ports:
|
||||||
|
- "18800:8000"
|
||||||
|
environment:
|
||||||
|
- TZ=${TZ:-Asia/Seoul}
|
||||||
|
- DATA_GO_KR_API_KEY=${DATA_GO_KR_API_KEY:-}
|
||||||
|
- CORS_ALLOW_ORIGINS=${CORS_ALLOW_ORIGINS:-http://localhost:3007,http://localhost:8080}
|
||||||
|
volumes:
|
||||||
|
- ${REALESTATE_DATA_PATH:-./data/realestate}:/app/data
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "python", "-c", "import urllib.request; urllib.request.urlopen('http://localhost:8000/health')"]
|
||||||
|
interval: 30s
|
||||||
|
timeout: 5s
|
||||||
|
retries: 3
|
||||||
|
|
||||||
travel-proxy:
|
travel-proxy:
|
||||||
build: ./travel-proxy
|
build: ./travel-proxy
|
||||||
container_name: travel-proxy
|
container_name: travel-proxy
|
||||||
@@ -119,6 +138,7 @@ services:
|
|||||||
depends_on:
|
depends_on:
|
||||||
- music-lab
|
- music-lab
|
||||||
- blog-lab
|
- blog-lab
|
||||||
|
- realestate-lab
|
||||||
ports:
|
ports:
|
||||||
- "8080:80"
|
- "8080:80"
|
||||||
volumes:
|
volumes:
|
||||||
|
|||||||
@@ -42,6 +42,16 @@ server {
|
|||||||
proxy_pass http://$music_backend$request_uri;
|
proxy_pass http://$music_backend$request_uri;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# realestate API
|
||||||
|
location /api/realestate/ {
|
||||||
|
proxy_http_version 1.1;
|
||||||
|
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_pass http://realestate-lab:8000/api/realestate/;
|
||||||
|
}
|
||||||
|
|
||||||
# travel thumbnails (generated by travel-proxy, stored in /data/thumbs)
|
# travel thumbnails (generated by travel-proxy, stored in /data/thumbs)
|
||||||
location ^~ /media/travel/.thumb/ {
|
location ^~ /media/travel/.thumb/ {
|
||||||
alias /data/thumbs/;
|
alias /data/thumbs/;
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ cd "$SRC"
|
|||||||
# backend, travel-proxy, deployer, nginx, scripts, docker-compose.yml, .env 등
|
# backend, travel-proxy, deployer, nginx, scripts, docker-compose.yml, .env 등
|
||||||
RSYNC_EXCLUDES="--exclude .git --exclude __pycache__ --exclude *.pyc --exclude data/"
|
RSYNC_EXCLUDES="--exclude .git --exclude __pycache__ --exclude *.pyc --exclude data/"
|
||||||
|
|
||||||
for dir in backend travel-proxy deployer stock-lab music-lab blog-lab nginx scripts; do
|
for dir in backend travel-proxy deployer stock-lab music-lab blog-lab realestate-lab nginx scripts; do
|
||||||
rsync -a --delete $RSYNC_EXCLUDES \
|
rsync -a --delete $RSYNC_EXCLUDES \
|
||||||
"$SRC/$dir/" "$DST/$dir/"
|
"$SRC/$dir/" "$DST/$dir/"
|
||||||
done
|
done
|
||||||
|
|||||||
Reference in New Issue
Block a user