diff --git a/README.md b/README.md index 9afa165..746ae61 100644 --- a/README.md +++ b/README.md @@ -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 up ` +1. Start the container using `docker compose watch ` ### according above flow, we can achieve : g connect to the existing traefik-public network diff --git a/docker-compose.override.yml b/docker-compose.override.yml index ac9c7dc..fa87941 100644 --- a/docker-compose.override.yml +++ b/docker-compose.override.yml @@ -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 diff --git a/docker-compose.yml b/docker-compose.yml index 272f48f..38bb0a3 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -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: diff --git a/frontend/.env b/frontend/.env index fac68c8..2f3ca2f 100644 --- a/frontend/.env +++ b/frontend/.env @@ -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 \ No newline at end of file