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
"https://autonetsellcar.com", # Production domain
"http://autonetsellcar.com", # Production (HTTP redirect)
"https://staging.autonetsellcar.com", # Staging domain
"http://staging.autonetsellcar.com", # Staging (HTTP redirect)
],
allow_credentials=True,
allow_methods=["*"],

View File

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