Skip to content

Commit

Permalink
Merge pull request #9 from wayofdev/feat/temporal-and-rr
Browse files Browse the repository at this point in the history
  • Loading branch information
lotyp authored Jul 30, 2024
2 parents 15a1f33 + 578b34d commit 6c6037c
Show file tree
Hide file tree
Showing 6 changed files with 94 additions and 64 deletions.
3 changes: 3 additions & 0 deletions app/.phive/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*
!.gitignore
!phars.xml
6 changes: 6 additions & 0 deletions app/.phive/phars.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<phive xmlns="https://phar.io/phive">
<phar name="composer-normalize" version="^2.42.0" installed="2.42.0" location="./.phive/composer-normalize" copy="false"/>
<phar name="composer-require-checker" version="^4.11.0" installed="4.11.0" location="./.phive/composer-require-checker" copy="false"/>
<phar name="deptrac" version="^2.0.0" installed="2.0.0" location="./.phive/deptrac" copy="false"/>
</phive>
63 changes: 32 additions & 31 deletions app/composer.json
Original file line number Diff line number Diff line change
@@ -1,39 +1,42 @@
{
"name": "spiral/app",
"type": "project",
"license": "MIT",
"description": "Spiral Application installer",
"license": "MIT",
"type": "project",
"homepage": "https://spiral.dev",
"support": {
"issues": "https://github.com/spiral/app/issues",
"source": "https://github.com/spiral/app"
},
"require": {
"php": ">=8.1",
"spiral/framework": "^3.8",
"spiral/roadrunner-cli": "^2.5",
"spiral/http": "^3.8",
"php": "^8.3",
"ext-mbstring": "*",
"spiral/nyholm-bridge": "^1.3",
"spiral/roadrunner-bridge": "^3.0",
"ext-pdo": "*",
"ext-sockets": "*",
"spiral-packages/yii-error-handler-bridge": "^1.1",
"spiral/sapi-bridge": "^1.0.1",
"spiral/cycle-bridge": "^2.5",
"illuminate/collections": "^9.0",
"illuminate/collections": "^9.52",
"spiral-packages/laravel-validator": "^1.1",
"spiral/views": "^3.8",
"spiral/data-grid-bridge": "^3.0.1",
"spiral-packages/league-event": "^1.0.1",
"spiral-packages/league-event": "^1.0",
"spiral-packages/scheduler": "^2.1",
"spiral/temporal-bridge": "^3.0",
"spiral/sentry-bridge": "^2.1"
"spiral-packages/yii-error-handler-bridge": "^1.1",
"spiral/cycle-bridge": "^2.9",
"spiral/data-grid-bridge": "^3.0",
"spiral/framework": "^3.13",
"spiral/http": "^3.8",
"spiral/nyholm-bridge": "^1.3",
"spiral/roadrunner-bridge": "^3.6",
"spiral/roadrunner-cli": "^2.6",
"spiral/sapi-bridge": "^1.0",
"spiral/sentry-bridge": "^2.2",
"spiral/temporal-bridge": "^3.1",
"spiral/views": "^3.8"
},
"require-dev": {
"spiral/dumper": "^3.2.1",
"spiral/testing": "^2.3",
"vimeo/psalm": "^5.9",
"spiral/dumper": "^3.2.1"
"vimeo/psalm": "^5.9"
},
"minimum-stability": "dev",
"prefer-stable": true,
"autoload": {
"psr-4": {
"App\\": "app/src"
Expand All @@ -44,15 +47,15 @@
"Tests\\": "tests"
}
},
"extra": {
"publish-cmd": "php app.php publish"
},
"config": {
"sort-packages": true,
"allow-plugins": {
"spiral/composer-publish-plugin": true,
"php-http/discovery": true
}
"php-http/discovery": true,
"spiral/composer-publish-plugin": true
},
"sort-packages": true
},
"extra": {
"publish-cmd": "php app.php publish"
},
"scripts": {
"post-create-project-cmd": [
Expand All @@ -61,12 +64,10 @@
"rr get-binary --quiet",
"composer dump-autoload"
],
"psalm:config": "psalm",
"rr:download": "rr get-binary",
"rr:download-protoc": "rr download-protoc-binary",
"test": "vendor/bin/phpunit",
"test-coverage": "vendor/bin/phpunit --coverage",
"psalm:config": "psalm"
},
"minimum-stability": "dev",
"prefer-stable": true
"test-coverage": "vendor/bin/phpunit --coverage"
}
}
57 changes: 31 additions & 26 deletions app/composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 16 additions & 4 deletions docker-compose.temporal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ services:
restart: on-failure
networks:
- default
- shared
ports:
- '${TEMPORAL_DB_FORWARD_PORT:-5446}:5432'
environment:
Expand All @@ -16,16 +15,22 @@ services:
POSTGRES_DB: ${TEMPORAL_DB_DATABASE}
volumes:
- temporal-database-data:/var/lib/postgresql/data:cached
healthcheck:
test: ['CMD', 'pg_isready', '-U', '${TEMPORAL_DB_USERNAME:-temporal}', '-d', '${TEMPORAL_DB_DATABASE:-temporal}']
interval: 3s
timeout: 1s
start_period: 0s
retries: 9

temporal:
image: temporalio/auto-setup:1.24.2
container_name: ${COMPOSE_PROJECT_NAME}-temporal
restart: on-failure
networks:
- default
- shared
depends_on:
- temporal-database
temporal-database:
condition: service_healthy
ports:
- '${TEMPORAL_FORWARD_PORT:-7233}:7233'
environment:
Expand All @@ -37,6 +42,12 @@ services:
- DYNAMIC_CONFIG_FILE_PATH=config/dynamicconfig/development-sql.yaml
volumes:
- ./docker/temporal:/etc/temporal/config/dynamicconfig
healthcheck:
test: ['CMD-SHELL', 'tctl', '--address', '${TEMPORAL_ADDRESS:-temporal:7233}', 'workflow list']
interval: 1s
timeout: 5s
start_period: 2s
retries: 9

temporal-ui:
image: temporalio/ui:2.29.2
Expand All @@ -46,7 +57,8 @@ services:
- default
- shared
depends_on:
- temporal
temporal:
condition: service_healthy
environment:
- TEMPORAL_ADDRESS=temporal:7233
- TEMPORAL_CORS_ORIGINS=https://temporal.${COMPOSE_PROJECT_NAME}.docker
Expand Down
9 changes: 6 additions & 3 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@ services:
- default
- shared
depends_on:
- database
database:
condition: service_healthy
temporal:
condition: service_healthy
links:
- database
volumes:
Expand Down Expand Up @@ -45,7 +48,6 @@ services:
restart: on-failure
networks:
- default
- shared
ports:
- '${DB_FORWARD_PORT:-5445}:5432'
environment:
Expand All @@ -58,7 +60,8 @@ services:
test: ['CMD', 'pg_isready', '-U', '${DB_USERNAME:-spiral}', '-d', '${DB_DATABASE:-spiral}']
interval: 3s
timeout: 1s
retries: 10
start_period: 0s
retries: 9

volumes:
database-data:
Expand Down

0 comments on commit 6c6037c

Please sign in to comment.