diff --git a/scripts/run.sh b/scripts/run.sh index 898744f..0fa4a69 100644 --- a/scripts/run.sh +++ b/scripts/run.sh @@ -116,7 +116,7 @@ docker build -t p1ctos4ve-backend:latest -f apps/backend/Dockerfile . echo -e "${YELLOW}๐Ÿ—„๏ธ Step 3: Running database migrations...${NC}" docker run --rm \ --network "${NETWORK_NAME}" \ - -e DATABASE_URL="postgresql://p1ctos4ve:p1ctos4ve_password@postgres:5432/p1ctos4ve" \ + -e DATABASE_URL="postgresql://p1ctos4ve:p1ctos4ve_password@host.docker.internal:5432/p1ctos4ve" \ -e REDIS_URL="redis://redis:6379" \ -e S3_ENDPOINT="http://seaweedfs-s3:8333" \ -e S3_REGION="us-east-1" \ @@ -136,9 +136,9 @@ docker run --rm \ echo -e "${YELLOW}๐Ÿงช Step 4: Running unit tests...${NC}" docker run --rm \ --network "${NETWORK_NAME}" \ - -e DATABASE_URL="postgresql://p1ctos4ve:p1ctos4ve_password@postgres:5432/p1ctos4ve" \ - -e REDIS_URL="redis://redis:6379" \ - -e S3_ENDPOINT="http://seaweedfs-s3:8333" \ + -e DATABASE_URL="postgresql://p1ctos4ve:p1ctos4ve_password@host.docker.internal:5432/p1ctos4ve" \ + -e REDIS_URL="redis://host.docker.internal:6379" \ + -e S3_ENDPOINT="http://host.docker.internal:8333" \ -e S3_REGION="us-east-1" \ -e S3_BUCKET="${BUCKET_NAME}" \ -e S3_ACCESS_KEY_ID="any" \ @@ -168,9 +168,9 @@ BACKEND_CONTAINER=$(docker run -d \ --name p1ctos4ve-backend-test \ --network "${NETWORK_NAME}" \ -p 3000:3000 \ - -e DATABASE_URL="postgresql://p1ctos4ve:p1ctos4ve_password@postgres:5432/p1ctos4ve" \ - -e REDIS_URL="redis://redis:6379" \ - -e S3_ENDPOINT="http://seaweedfs-s3:8333" \ + -e DATABASE_URL="postgresql://p1ctos4ve:p1ctos4ve_password@host.docker.internal:5432/p1ctos4ve" \ + -e REDIS_URL="redis://host.docker.internal:6379" \ + -e S3_ENDPOINT="http://host.docker.internal:8333" \ -e S3_REGION="us-east-1" \ -e S3_BUCKET="${BUCKET_NAME}" \ -e S3_ACCESS_KEY_ID="any" \ @@ -199,9 +199,9 @@ echo -e " ${GREEN}โœ“${NC}" docker exec p1ctos4ve-backend-test sh -c "bun test --preload ./src/tests/setup.ts src/tests/e2e/" || \ docker run --rm \ --network "${NETWORK_NAME}" \ - -e DATABASE_URL="postgresql://p1ctos4ve:p1ctos4ve_password@postgres:5432/p1ctos4ve" \ - -e REDIS_URL="redis://redis:6379" \ - -e S3_ENDPOINT="http://seaweedfs-s3:8333" \ + -e DATABASE_URL="postgresql://p1ctos4ve:p1ctos4ve_password@host.docker.internal:5432/p1ctos4ve" \ + -e REDIS_URL="redis://host.docker.internal:6379" \ + -e S3_ENDPOINT="http://host.docker.internal:8333" \ -e S3_REGION="us-east-1" \ -e S3_BUCKET="${BUCKET_NAME}" \ -e S3_ACCESS_KEY_ID="any" \ @@ -237,9 +237,9 @@ echo -e "${YELLOW}Press Ctrl+C to stop${NC}" docker run --rm \ --network "${NETWORK_NAME}" \ -p 3000:3000 \ - -e DATABASE_URL="postgresql://p1ctos4ve:p1ctos4ve_password@postgres:5432/p1ctos4ve" \ - -e REDIS_URL="redis://redis:6379" \ - -e S3_ENDPOINT="http://seaweedfs-s3:8333" \ + -e DATABASE_URL="postgresql://p1ctos4ve:p1ctos4ve_password@host.docker.internal:5432/p1ctos4ve" \ + -e REDIS_URL="redis://host.docker.internal:6379" \ + -e S3_ENDPOINT="http://host.docker.internal:8333" \ -e S3_REGION="us-east-1" \ -e S3_BUCKET="${BUCKET_NAME}" \ -e S3_ACCESS_KEY_ID="any" \