Skip to content

Commit

Permalink
Merge pull request #104 from open-runtimes/update-exception
Browse files Browse the repository at this point in the history
Update exception
  • Loading branch information
christyjacob4 authored Sep 16, 2024
2 parents 7002ad7 + 0131b92 commit 3125c03
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 10 deletions.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ OPR_EXECUTOR_RUNTIMES=php-8.1,dart-2.18,deno-1.24,node-18.0,python-3.10,ruby-3.1
OPR_EXECUTOR_CONNECTION_STORAGE=file://localhost
OPR_EXECUTOR_INACTIVE_TRESHOLD=60
OPR_EXECUTOR_MAINTENANCE_INTERVAL=60
OPR_EXECUTOR_NETWORK=runtimes-1,runtimes-2
OPR_EXECUTOR_NETWORK=executor_runtimes
OPR_EXECUTOR_IMAGE=executor-local
OPR_EXECUTOR_SECRET=executor-secret-key
OPR_EXECUTOR_LOGGING_PROVIDER=
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 runtimes-1 -w /app phpswoole/swoole:5.1.2-php8.3-alpine sh -c \
docker run --rm -v $PWD:/app --network executor_runtimes -w /app phpswoole/swoole:5.1.2-php8.3-alpine sh -c \
"composer install --profile --ignore-platform-reqs && composer test"
6 changes: 1 addition & 5 deletions app/http.php
Original file line number Diff line number Diff line change
Expand Up @@ -269,11 +269,7 @@ function getStorageDevice(string $root): Device
*/
function createNetworks(Orchestration $orchestration, array $networks): array
{
$image = Http::getEnv('OPR_EXECUTOR_IMAGE');
if (empty($image)) {
throw new \Exception('Variable OPR_EXECUTOR_IMAGE is not set');
}

$image = Http::getEnv('OPR_EXECUTOR_IMAGE', '');
$containers = $orchestration->list(['label' => "openruntimes-image=$image"]);

if (count($containers) < 1) {
Expand Down
8 changes: 5 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ services:
stop_signal: SIGINT
build:
context: .
networks:
- runtimes
ports:
- 9900:80
labels:
openruntimes-image: $OPR_EXECUTOR_IMAGE
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ./app:/usr/local/app:rw
Expand All @@ -41,7 +41,6 @@ services:
- OPR_EXECUTOR_MAINTENANCE_INTERVAL
- OPR_EXECUTOR_NETWORK
- OPR_EXECUTOR_SECRET
- OPR_EXECUTOR_IMAGE
- OPR_EXECUTOR_LOGGING_PROVIDER
- OPR_EXECUTOR_LOGGING_CONFIG
- OPR_EXECUTOR_DOCKER_HUB_USERNAME
Expand All @@ -51,3 +50,6 @@ services:
volumes:
openruntimes-builds:
openruntimes-functions:

networks:
runtimes:

0 comments on commit 3125c03

Please sign in to comment.