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:
@@ -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=["*"],
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user