Add CORS for staging domain and update docker-compose

- Add https://staging.autonetsellcar.com to CORS allowed origins
- Update docker-compose.staging.yml to use .env file and correct paths

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
AutonetSellCar Deploy
2026-01-04 09:49:01 +09:00
parent b8cab29ed2
commit 9dafe48473
2 changed files with 11 additions and 11 deletions

View File

@@ -171,6 +171,8 @@ app.add_middleware(
"http://192.168.0.202:8001", # Staging backend "http://192.168.0.202:8001", # Staging backend
"https://autonetsellcar.com", # Production domain "https://autonetsellcar.com", # Production domain
"http://autonetsellcar.com", # Production (HTTP redirect) "http://autonetsellcar.com", # Production (HTTP redirect)
"https://staging.autonetsellcar.com", # Staging domain
"http://staging.autonetsellcar.com", # Staging (HTTP redirect)
], ],
allow_credentials=True, allow_credentials=True,
allow_methods=["*"], allow_methods=["*"],

View File

@@ -4,18 +4,17 @@ services:
context: ./frontend context: ./frontend
dockerfile: Dockerfile dockerfile: Dockerfile
args: args:
- NEXT_PUBLIC_API_URL= - NEXT_PUBLIC_API_URL=https://staging.autonetsellcar.com
container_name: autonet-frontend-staging container_name: autonet-frontend-staging
ports: ports:
- "3001:3000" - "3001:3000"
environment: environment:
- NODE_ENV=staging - NODE_ENV=production
- BACKEND_URL=http://backend-staging:8000
depends_on: depends_on:
- backend-staging - backend-staging
restart: unless-stopped restart: unless-stopped
networks: networks:
- autonet-staging - mongolcar-network
backend-staging: backend-staging:
build: build:
@@ -24,15 +23,14 @@ services:
container_name: autonet-backend-staging container_name: autonet-backend-staging
ports: ports:
- "8001:8000" - "8001:8000"
environment: env_file:
- ENV=staging - ./backend/.env
volumes: volumes:
- /opt/autonet/production/backend/uploads:/app/uploads - /opt/autonet/staging/backend/uploads:/app/uploads
- /opt/autonet/production/backend/autonet.db:/app/autonet.db
restart: unless-stopped restart: unless-stopped
networks: networks:
- autonet-staging - mongolcar-network
networks: networks:
autonet-staging: mongolcar-network:
name: autonet-staging-network external: true