From b4e38d078084c0ac79f460e4748b9af28d29bb74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matej=20Ba=C4=8Do?= Date: Thu, 29 Feb 2024 09:14:21 +0000 Subject: [PATCH] Rename product --- .github/workflows/release.yml | 2 +- .github/workflows/tests.yml | 2 +- README.md | 5 +---- app/http.php | 2 +- composer.json | 2 +- docker-compose.yml | 4 ++-- tests/ProxyTest.php | 4 ++-- 7 files changed, 9 insertions(+), 12 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0848ab5..fa18439 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,7 +5,7 @@ on: types: [published] env: - IMAGE_NAME: utopia-php/data-api + IMAGE_NAME: appwrite/database-proxy TAG: ${{ github.event.release.tag_name }} USERNAME: ${{ secrets.DOCKERHUB_USERNAME }} PASSWORD: ${{ secrets.DOCKERHUB_PASSWORD }} diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index ff9b7e2..df49a9b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -29,5 +29,5 @@ jobs: - name: Run Tests run: | - docker run --rm -v $PWD:/app --network data-api_database -w /app phpswoole/swoole:4.8.12-php8.1-alpine sh -c \ + docker run --rm -v $PWD:/app --network database-proxy_database -w /app phpswoole/swoole:4.8.12-php8.1-alpine sh -c \ "composer install --profile --ignore-platform-reqs && composer test" \ No newline at end of file diff --git a/README.md b/README.md index cb4873e..a2aeecd 100644 --- a/README.md +++ b/README.md @@ -1,4 +1 @@ -# Utopia PHP Data API - -Build: -docker build -t data-api . \ No newline at end of file +# Utopia PHP Database Proxy diff --git a/app/http.php b/app/http.php index 120d306..10e7468 100644 --- a/app/http.php +++ b/app/http.php @@ -259,7 +259,7 @@ $version = 'UNKNOWN'; } - $log->setNamespace("data-api"); + $log->setNamespace("database-proxy"); $log->setServer(\gethostname() !== false ? \gethostname() : null); $log->setVersion($version); $log->setType(Log::TYPE_ERROR); diff --git a/composer.json b/composer.json index d744d50..805e372 100644 --- a/composer.json +++ b/composer.json @@ -1,5 +1,5 @@ { - "name": "utopia/data-api", + "name": "utopia/database-proxy", "description": "HTTP proxy to manage Utopia Database connections.", "type": "project", "license": "MIT", diff --git a/docker-compose.yml b/docker-compose.yml index 4ca9e60..a0c6580 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -1,8 +1,8 @@ version: '3.1' services: - data-api: - container_name: data-api + database-proxy: + container_name: database-proxy image: proxy-dev build: context: . diff --git a/tests/ProxyTest.php b/tests/ProxyTest.php index 95bbde1..916502e 100644 --- a/tests/ProxyTest.php +++ b/tests/ProxyTest.php @@ -13,7 +13,7 @@ final class ProxyTest extends TestCase { - protected string $endpoint = 'http://data-api/v1'; + protected string $endpoint = 'http://database-proxy/v1'; protected string $secret = 'proxy-secret-key'; protected string $namespace = 'my-namespace'; protected string $database = 'appwrite'; @@ -84,7 +84,7 @@ public function testTimeout(): void public function testMock(): void { $correctEndpoint = $this->endpoint; - $this->endpoint = 'http://data-api/mock'; + $this->endpoint = 'http://database-proxy/mock'; $response = $this->call('GET', '/error'); self::assertEquals(500, $response->getStatusCode()); $this->endpoint = $correctEndpoint;