fix:fix some connect bug

This commit is contained in:
bbh
2025-08-04 23:23:43 +08:00
parent f478ffe320
commit fb36c9fd41
4 changed files with 39 additions and 31 deletions

View File

@@ -4,7 +4,7 @@ Test Environment Deployment Goals:
1. Complete local development ->
1. Push to the repository ->
1. Pull code for testing ->
1. Start the container using `docker compose -f <filename> up `
1. Start the container using `docker compose watch `
### according above flow, we can achieve : g
connect to the existing traefik-public network

View File

@@ -99,35 +99,39 @@ services:
build:
context: ./frontend
args:
- VITE_API_URL=http://localhost:8000
- VITE_API_URL=http://120.76.41.122:8000
- NODE_ENV=development
develop:
watch:
- path: ./frontend
action: rebuild
playwright:
build:
context: ./frontend
dockerfile: Dockerfile.playwright
args:
- VITE_API_URL=http://backend:8000
- NODE_ENV=production
ipc: host
depends_on:
- backend
- mailcatcher
env_file:
- .env
environment:
- VITE_API_URL=http://backend:8000
- MAILCATCHER_HOST=http://mailcatcher:1080
# For the reports when run locally
- PLAYWRIGHT_HTML_HOST=0.0.0.0
- CI=${CI}
volumes:
- ./frontend/blob-report:/app/blob-report
- ./frontend/test-results:/app/test-results
ports:
- 9323:9323
# playwright:
# build:
# context: ./frontend
# dockerfile: Dockerfile.playwright
# args:
# - VITE_API_URL=http://backend:8000
# - NODE_ENV=production
# ipc: host
# depends_on:
# - backend
# - mailcatcher
# env_file:
# - .env
# environment:
# - VITE_API_URL=http://backend:8000
# - MAILCATCHER_HOST=http://mailcatcher:1080
# # For the reports when run locally
# - PLAYWRIGHT_HTML_HOST=0.0.0.0
# - CI=${CI}
# volumes:
# - ./frontend/blob-report:/app/blob-report
# - ./frontend/test-results:/app/test-results
# ports:
# - 9323:9323
networks:
traefik-public:
# For local dev, don't expect an external Traefik network
external: true
external: false

View File

@@ -140,11 +140,12 @@ services:
networks:
- traefik-public
- default
env_file:
- .env
build:
context: ./frontend
args:
- VITE_API_URL=http://api.${DOMAIN?Variable not set}
# - VITE_API_URL=https://api.${DOMAIN?Variable not set}
- VITE_API_URL=https://api.${DOMAIN?Variable not set}
- NODE_ENV=production
labels:
- traefik.enable=true
@@ -163,6 +164,9 @@ services:
# Enable redirection for HTTP and HTTPS
- traefik.http.routers.${STACK_NAME?Variable not set}-frontend-http.middlewares=https-redirect
volumes:
app-db-data:

View File

@@ -1,2 +1,2 @@
VITE_API_URL=http://backend:8000
MAILCATCHER_HOST=http://localhost:1080
VITE_API_URL=http://120.76.41.122:8000
MAILCATCHER_HOST=http://120.76.41.122:1080