Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
# Utopia PHP Data API

Build:
docker build -t data-api .
# Utopia PHP Database Proxy
2 changes: 1 addition & 1 deletion app/http.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "utopia/data-api",
"name": "utopia/database-proxy",
"description": "HTTP proxy to manage Utopia Database connections.",
"type": "project",
"license": "MIT",
Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -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: .
Expand Down
4 changes: 2 additions & 2 deletions tests/ProxyTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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;
Expand Down