diff --git a/README.md b/README.md index eb785d0..acdb881 100644 --- a/README.md +++ b/README.md @@ -39,52 +39,28 @@ The Database Playground is a platform designed to enhance your SQL skills throug ### Zeabur -1. Deploy Redis, PostgreSQL, Meilisearch, and Umami (for statistics) on Zeabur. -2. Deploy [SQL runner](https://github.com/database-playground/sqlrunner-v2) on Zeabur, and rename the service host to - `sqlrunner`. -3. Deploy the application in Git mode on Zeabur. You can use our prebuilt image at - the GitHub Registry. -4. Deploy the worker in Git mode on Zeabur. You can use our prebuilt image at - the GitHub Registry. Also, it is recommended to create more than 1 worker. -5. Add the following environment variables to the application: - ```env - DATABASE_URL=postgresql://${POSTGRES_USERNAME}:${POSTGRES_PASSWORD}@postgresql.zeabur.internal:5432/${POSTGRES_DATABASE}?serverVersion=16&charset=utf8 - REDIS_URI=${REDIS_CONNECTION_STRING} - SERVER_NAME=:${PORT} - APP_SECRET=${PASSWORD} - MEILISEARCH_URL=http://meilisearch.zeabur.internal:7700 - MEILISEARCH_API_KEY=${MEILI_MASTER_KEY} - UMAMI_DOMAIN=your-umami-domain.tld - UMAMI_WEBSITE_ID=your-website-id - OPENAI_API_KEY=your-openai-api-key - LINE_NOTIFY_DSN=linenotify://line-notify-token@default - SQLRUNNER_URL=http://sqlrunner.zeabur.internal:8080 - MAILER_DSN=ses://ACCESS_KEY:SECRET_KEY@default?region=eu-west-1 - MESSENGER_TRANSPORT_DSN=${REDIS_URI}/messages - ``` -6. Add the following environment variables to the worker: - ```env - DATABASE_URL=postgresql://${POSTGRES_USERNAME}:${POSTGRES_PASSWORD}@postgresql.zeabur.internal:5432/${POSTGRES_DATABASE}?serverVersion=16&charset=utf8 - REDIS_URI=${REDIS_CONNECTION_STRING} - MEILISEARCH_URL=http://meilisearch.zeabur.internal:7700 - MEILISEARCH_API_KEY=${MEILI_MASTER_KEY} - APP_SECRET=${PASSWORD} - LINE_NOTIFY_DSN=linenotify://line-notify-token@default - MAILER_DSN=ses://ACCESS_KEY:SECRET_KEY@default?region=eu-west-1 - MESSENGER_TRANSPORT_DSN=${REDIS_URI}/messages - MESSENGER_CONSUMER_NAME=app-sf-worker-1 # Change the number for each worker - ``` -7. Bind your domain, and the application will be ready for use. The Meilisearch index will be automatically created on start up. +We have 2 Zeabur template file: + +- `zeabur/app.yaml`: The main application. +- `zeabur/monitor.yaml`: The uptime monitor (containing the worker monitors). + +To deploy the application on Zeabur, follow these steps: + +1. Update the `` in the template file. You would need to fill some tokens and secrets there. +2. Create 2 projects (can be on different regions) on Zeabur. +3. Run `npx zeabur template deploy -f zeabur/app.yaml --project-id PROJECT-ID` to deploy the application. +4. Run `npx zeabur template deploy -f zeabur/monitor.yaml --project-id PROJECT-ID` to deploy the uptime monitor. +5. Restore the backup of PostgreSQL or import the schema and questions using the `app:import` command. +6. Create an account if you haven't done so: `php ./bin/console app:create-user -p "yourpassword" -r "ROLE_ADMIN" "admin" "admin@youremail.tld"` +7. Set up your Uptime Kuma in the monitor project. ### Docker -We provide a Docker Compose configuration based on [Symfony Docker](https://github.com/dunglas/symfony-docker) for -deployment. The prebuilt image is available at -the [GitHub Registry](https://github.com/orgs/database-playground/packages). +We provide a Docker Compose configuration based on [Symfony Docker](https://github.com/dunglas/symfony-docker) for deployment. The prebuilt image is available at the [GitHub Registry](https://github.com/orgs/database-playground/packages). -To deploy the application, you may need to update the secret or environment variables in the `compose.yaml` and -`compose.prod.yaml` files, and then run the following command: +To deploy the application, you may need to update the secret or environment variables in the `compose.yaml` and `compose.prod.yaml` files, and then run the following command: ```bash +export IMAGES_PREFIX=ghcr.io/database-playground/ docker compose -f compose.yaml -f compose.prod.yaml up -d ``` diff --git a/compose.yaml b/compose.yaml index dcaa8a2..dfe8cfd 100644 --- a/compose.yaml +++ b/compose.yaml @@ -1,7 +1,7 @@ services: ###> doctrine/doctrine-bundle ### database: - image: postgres:${POSTGRES_VERSION:-16}-alpine + image: pgautoupgrade/pgautoupgrade:${POSTGRES_VERSION:-17-alpine} environment: POSTGRES_DB: ${POSTGRES_DB:-app} # You should definitely change the password in production @@ -34,7 +34,7 @@ services: volumes: - redis_data:/data:rw meilisearch: - image: getmeili/meilisearch:${MEILISEARCH_VERSION:-v1.10} + image: getmeili/meilisearch:${MEILISEARCH_VERSION:-nightly} environment: MEILI_MASTER_KEY: ${MEILI_MASTER_KEY:-!MasterChangeMe!} volumes: @@ -50,7 +50,7 @@ services: restart: unless-stopped environment: SERVER_NAME: ${SERVER_NAME:-localhost}, php:80 - DATABASE_URL: "postgresql://${POSTGRES_USER:-app}:${POSTGRES_PASSWORD:-!ChangeMe!}@database:5432/${POSTGRES_DB:-app}?serverVersion=${POSTGRES_VERSION:-16}&charset=${POSTGRES_CHARSET:-utf8}" + DATABASE_URL: "postgresql://${POSTGRES_USER:-app}:${POSTGRES_PASSWORD:-!ChangeMe!}@database:5432/${POSTGRES_DB:-app}?serverVersion=${POSTGRES_VERSION:-17}&charset=${POSTGRES_CHARSET:-utf8}" REDIS_URI: "redis://redis:6379" MEILISEARCH_URL: "http://meilisearch:7700" MEILISEARCH_API_KEY: ${MEILI_MASTER_KEY:-!MasterChangeMe!} @@ -79,7 +79,7 @@ services: dockerfile: worker.Dockerfile context: . environment: - DATABASE_URL: "postgresql://${POSTGRES_USER:-app}:${POSTGRES_PASSWORD:-!ChangeMe!}@database:5432/${POSTGRES_DB:-app}?serverVersion=${POSTGRES_VERSION:-16}&charset=${POSTGRES_CHARSET:-utf8}" + DATABASE_URL: "postgresql://${POSTGRES_USER:-app}:${POSTGRES_PASSWORD:-!ChangeMe!}@database:5432/${POSTGRES_DB:-app}?serverVersion=${POSTGRES_VERSION:-17}&charset=${POSTGRES_CHARSET:-utf8}" REDIS_URI: "redis://redis:6379" MEILISEARCH_URL: "http://meilisearch:7700" MEILISEARCH_API_KEY: ${MEILI_MASTER_KEY:-!MasterChangeMe!} diff --git a/composer.lock b/composer.lock index cdf6212..41b3f2c 100644 --- a/composer.lock +++ b/composer.lock @@ -1761,12 +1761,12 @@ "source": { "type": "git", "url": "https://github.com/thephpleague/commonmark.git", - "reference": "b561666ac77bfbde7f0cc9bc4091e0db56b9f573" + "reference": "88365ec0a908702ae6dec328322d6666c9ceae0f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/b561666ac77bfbde7f0cc9bc4091e0db56b9f573", - "reference": "b561666ac77bfbde7f0cc9bc4091e0db56b9f573", + "url": "https://api.github.com/repos/thephpleague/commonmark/zipball/88365ec0a908702ae6dec328322d6666c9ceae0f", + "reference": "88365ec0a908702ae6dec328322d6666c9ceae0f", "shasum": "" }, "require": { @@ -1860,7 +1860,7 @@ "type": "tidelift" } ], - "time": "2024-12-07T15:56:47+00:00" + "time": "2024-12-10T13:07:29+00:00" }, { "name": "league/config", @@ -2098,12 +2098,12 @@ "source": { "type": "git", "url": "https://github.com/Seldaek/monolog.git", - "reference": "aef6ee73a77a66e404dd6540934a9ef1b3c855b4" + "reference": "d97d5e9468aa7d10f95b2e0468f39afdbd08a4d1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/aef6ee73a77a66e404dd6540934a9ef1b3c855b4", - "reference": "aef6ee73a77a66e404dd6540934a9ef1b3c855b4", + "url": "https://api.github.com/repos/Seldaek/monolog/zipball/d97d5e9468aa7d10f95b2e0468f39afdbd08a4d1", + "reference": "d97d5e9468aa7d10f95b2e0468f39afdbd08a4d1", "shasum": "" }, "require": { @@ -2182,7 +2182,7 @@ ], "support": { "issues": "https://github.com/Seldaek/monolog/issues", - "source": "https://github.com/Seldaek/monolog/tree/3.8.1" + "source": "https://github.com/Seldaek/monolog/tree/main" }, "funding": [ { @@ -2194,7 +2194,7 @@ "type": "tidelift" } ], - "time": "2024-12-05T17:15:07+00:00" + "time": "2024-12-10T13:30:50+00:00" }, { "name": "nette/schema", @@ -2576,27 +2576,27 @@ "source": { "type": "git", "url": "https://github.com/oroinc/doctrine-extensions.git", - "reference": "b681c1d2ad8bc55998781b4f45476058e7062517" + "reference": "ec7b24dff4bdbbe1a71ed375cc9d7c898c7b6ffd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/oroinc/doctrine-extensions/zipball/b681c1d2ad8bc55998781b4f45476058e7062517", - "reference": "b681c1d2ad8bc55998781b4f45476058e7062517", + "url": "https://api.github.com/repos/oroinc/doctrine-extensions/zipball/ec7b24dff4bdbbe1a71ed375cc9d7c898c7b6ffd", + "reference": "ec7b24dff4bdbbe1a71ed375cc9d7c898c7b6ffd", "shasum": "" }, "require": { - "doctrine/dbal": "~3.0|~4.0", - "doctrine/lexer": "~3.0", - "doctrine/orm": "~3.0", + "doctrine/dbal": "^3.3|^4.0", + "doctrine/lexer": "^2.0|^3.0", + "doctrine/orm": "^2.19|^3.0", "php": ">=8.1" }, "require-dev": { - "doctrine/annotations": "~2.0", - "doctrine/data-fixtures": "^1.3", + "doctrine/annotations": "^1.14|^2.0", + "doctrine/data-fixtures": "^1.6", "phpunit/phpunit": "~10", "squizlabs/php_codesniffer": "3.9.*", - "symfony/cache": "5.*", - "symfony/yaml": "5.*" + "symfony/cache": "^5|^6|^7", + "symfony/yaml": "^5|^6|^7" }, "default-branch": true, "type": "library", @@ -2631,7 +2631,7 @@ "issues": "https://github.com/oroinc/doctrine-extensions/issues", "source": "https://github.com/oroinc/doctrine-extensions/tree/master" }, - "time": "2024-07-01T11:02:49+00:00" + "time": "2024-12-10T17:06:28+00:00" }, { "name": "php-http/discovery", @@ -4128,12 +4128,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "722fa7cd85d81a3e61fcbdce053754c6541235d3" + "reference": "51accc898762e9a4a7212b2c28cd2a2e80f6f811" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/722fa7cd85d81a3e61fcbdce053754c6541235d3", - "reference": "722fa7cd85d81a3e61fcbdce053754c6541235d3", + "url": "https://api.github.com/repos/symfony/console/zipball/51accc898762e9a4a7212b2c28cd2a2e80f6f811", + "reference": "51accc898762e9a4a7212b2c28cd2a2e80f6f811", "shasum": "" }, "require": { @@ -4197,7 +4197,7 @@ "terminal" ], "support": { - "source": "https://github.com/symfony/console/tree/7.2" + "source": "https://github.com/symfony/console/tree/7.3" }, "funding": [ { @@ -4213,7 +4213,7 @@ "type": "tidelift" } ], - "time": "2024-12-09T09:56:03+00:00" + "time": "2024-12-10T13:43:07+00:00" }, { "name": "symfony/dependency-injection", @@ -5476,12 +5476,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/http-foundation.git", - "reference": "e88a66c3997859532bc2ddd6dd8f35aba2711744" + "reference": "069924c165fb05f1d0860f21addff0f1d0778e44" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/e88a66c3997859532bc2ddd6dd8f35aba2711744", - "reference": "e88a66c3997859532bc2ddd6dd8f35aba2711744", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/069924c165fb05f1d0860f21addff0f1d0778e44", + "reference": "069924c165fb05f1d0860f21addff0f1d0778e44", "shasum": "" }, "require": { @@ -5530,7 +5530,7 @@ "description": "Defines an object-oriented layer for the HTTP specification", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/http-foundation/tree/v7.2.0" + "source": "https://github.com/symfony/http-foundation/tree/7.3" }, "funding": [ { @@ -5546,7 +5546,7 @@ "type": "tidelift" } ], - "time": "2024-11-13T18:58:46+00:00" + "time": "2024-12-10T12:42:37+00:00" }, { "name": "symfony/http-kernel", @@ -5554,12 +5554,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/http-kernel.git", - "reference": "1078dfea48501bcf5f5e1fdc59b273a2c130f3e5" + "reference": "a1ecd5c472717cd4fb638b6c5f0ebbceb23096ce" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-kernel/zipball/1078dfea48501bcf5f5e1fdc59b273a2c130f3e5", - "reference": "1078dfea48501bcf5f5e1fdc59b273a2c130f3e5", + "url": "https://api.github.com/repos/symfony/http-kernel/zipball/a1ecd5c472717cd4fb638b6c5f0ebbceb23096ce", + "reference": "a1ecd5c472717cd4fb638b6c5f0ebbceb23096ce", "shasum": "" }, "require": { @@ -5660,7 +5660,7 @@ "type": "tidelift" } ], - "time": "2024-12-07T08:55:22+00:00" + "time": "2024-12-10T17:37:16+00:00" }, { "name": "symfony/intl", @@ -6714,8 +6714,8 @@ "type": "library", "extra": { "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { @@ -6882,8 +6882,8 @@ "type": "library", "extra": { "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { @@ -6957,8 +6957,8 @@ "type": "library", "extra": { "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" + "url": "https://github.com/symfony/polyfill", + "name": "symfony/polyfill" } }, "autoload": { @@ -8901,12 +8901,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/ux-live-component.git", - "reference": "060e0c64e64125a4dfbf37dec281157faade1feb" + "reference": "c79661f127496b2243b6420184b150810351ffcb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/ux-live-component/zipball/060e0c64e64125a4dfbf37dec281157faade1feb", - "reference": "060e0c64e64125a4dfbf37dec281157faade1feb", + "url": "https://api.github.com/repos/symfony/ux-live-component/zipball/c79661f127496b2243b6420184b150810351ffcb", + "reference": "c79661f127496b2243b6420184b150810351ffcb", "shasum": "" }, "require": { @@ -8972,7 +8972,7 @@ "twig" ], "support": { - "source": "https://github.com/symfony/ux-live-component/tree/v2.22.1" + "source": "https://github.com/symfony/ux-live-component/tree/2.x" }, "funding": [ { @@ -8988,7 +8988,7 @@ "type": "tidelift" } ], - "time": "2024-12-07T10:13:15+00:00" + "time": "2024-12-11T00:38:37+00:00" }, { "name": "symfony/ux-turbo", @@ -9646,12 +9646,12 @@ "source": { "type": "git", "url": "https://github.com/twbs/bootstrap.git", - "reference": "760b4cc41dcf09ad7f68c6b3b11768755ff2ec0b" + "reference": "ff7d1be0b73dc6a6c28df133607d8300c14b55aa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twbs/bootstrap/zipball/760b4cc41dcf09ad7f68c6b3b11768755ff2ec0b", - "reference": "760b4cc41dcf09ad7f68c6b3b11768755ff2ec0b", + "url": "https://api.github.com/repos/twbs/bootstrap/zipball/ff7d1be0b73dc6a6c28df133607d8300c14b55aa", + "reference": "ff7d1be0b73dc6a6c28df133607d8300c14b55aa", "shasum": "" }, "replace": { @@ -9689,7 +9689,7 @@ "issues": "https://github.com/twbs/bootstrap/issues", "source": "https://github.com/twbs/bootstrap/tree/main" }, - "time": "2024-12-07T05:31:01+00:00" + "time": "2024-12-10T12:03:18+00:00" }, { "name": "twig/extra-bundle", @@ -9752,7 +9752,7 @@ "twig" ], "support": { - "source": "https://github.com/twigphp/twig-extra-bundle/tree/v3.16.0" + "source": "https://github.com/twigphp/twig-extra-bundle/tree/v3.17.0" }, "funding": [ { @@ -9825,7 +9825,7 @@ "twig" ], "support": { - "source": "https://github.com/twigphp/markdown-extra/tree/3.x" + "source": "https://github.com/twigphp/markdown-extra/tree/v3.17.0" }, "funding": [ { @@ -9893,7 +9893,7 @@ "unicode" ], "support": { - "source": "https://github.com/twigphp/string-extra/tree/3.x" + "source": "https://github.com/twigphp/string-extra/tree/v3.17.0" }, "funding": [ { @@ -9913,12 +9913,12 @@ "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "57bf519af2bd60fe181fd632bd268e73daab807f" + "reference": "31f61bd781e839f007b3f176262bffdbb8e34587" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/57bf519af2bd60fe181fd632bd268e73daab807f", - "reference": "57bf519af2bd60fe181fd632bd268e73daab807f", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/31f61bd781e839f007b3f176262bffdbb8e34587", + "reference": "31f61bd781e839f007b3f176262bffdbb8e34587", "shasum": "" }, "require": { @@ -9986,7 +9986,7 @@ "type": "tidelift" } ], - "time": "2024-12-02T09:21:10+00:00" + "time": "2024-12-10T15:20:20+00:00" }, { "name": "webmozart/assert", @@ -10374,12 +10374,12 @@ "source": { "type": "git", "url": "https://github.com/PHP-CS-Fixer/PHP-CS-Fixer.git", - "reference": "368c69911508013afeeac541325c5e8f5c72d0a7" + "reference": "a3726ef887235d7cd7457991935b5ddfc6a3a7fd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/368c69911508013afeeac541325c5e8f5c72d0a7", - "reference": "368c69911508013afeeac541325c5e8f5c72d0a7", + "url": "https://api.github.com/repos/PHP-CS-Fixer/PHP-CS-Fixer/zipball/a3726ef887235d7cd7457991935b5ddfc6a3a7fd", + "reference": "a3726ef887235d7cd7457991935b5ddfc6a3a7fd", "shasum": "" }, "require": { @@ -10470,7 +10470,7 @@ "type": "github" } ], - "time": "2024-12-09T23:12:05+00:00" + "time": "2024-12-10T10:53:16+00:00" }, { "name": "masterminds/html5", @@ -10832,12 +10832,12 @@ "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "89ddae6cfbfbce545dd694caecfaa3872652cff2" + "reference": "65dc199c3c137db0ee1b05cf94c8fe65d53fedbd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/89ddae6cfbfbce545dd694caecfaa3872652cff2", - "reference": "89ddae6cfbfbce545dd694caecfaa3872652cff2", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/65dc199c3c137db0ee1b05cf94c8fe65d53fedbd", + "reference": "65dc199c3c137db0ee1b05cf94c8fe65d53fedbd", "shasum": "" }, "require": { @@ -10883,7 +10883,7 @@ "type": "github" } ], - "time": "2024-12-09T09:17:33+00:00" + "time": "2024-12-10T13:04:19+00:00" }, { "name": "phpstan/phpstan-doctrine", diff --git a/devenv.lock b/devenv.lock index 8d858b8..8a1ec3d 100644 --- a/devenv.lock +++ b/devenv.lock @@ -3,10 +3,10 @@ "devenv": { "locked": { "dir": "src/modules", - "lastModified": 1733595596, + "lastModified": 1733788855, "owner": "cachix", "repo": "devenv", - "rev": "c1ca69791bfa466e77b3d21e0e2f492810d83250", + "rev": "d59fee8696cd48f69cf79f65992269df9891ba86", "type": "github" }, "original": { @@ -53,10 +53,10 @@ }, "nixpkgs": { "locked": { - "lastModified": 1733376361, + "lastModified": 1733749988, "owner": "nixos", "repo": "nixpkgs", - "rev": "929116e316068c7318c54eb4d827f7d9756d5e9c", + "rev": "bc27f0fde01ce4e1bfec1ab122d72b7380278e68", "type": "github" }, "original": { @@ -68,10 +68,10 @@ }, "nixpkgs-stable": { "locked": { - "lastModified": 1733384649, + "lastModified": 1733730953, "owner": "NixOS", "repo": "nixpkgs", - "rev": "190c31a89e5eec80dd6604d7f9e5af3802a58a13", + "rev": "7109b680d161993918b0a126f38bc39763e5a709", "type": "github" }, "original": { diff --git a/importmap.php b/importmap.php index e648e4c..d5e2702 100644 --- a/importmap.php +++ b/importmap.php @@ -92,6 +92,6 @@ 'version' => '0.3.4', ], '@marijn/find-cluster-break' => [ - 'version' => '1.0.0', + 'version' => '1.0.2', ], ]; diff --git a/package.json b/package.json index bdb5a4d..8a8b088 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,6 @@ "eslint": "^9.16.0", "globals": "^15.13.0", "typescript": "^5.7.2", - "typescript-eslint": "^8.17.0" + "typescript-eslint": "^8.18.0" } } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 05506d6..2e97b18 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -54,8 +54,8 @@ importers: specifier: ^5.7.2 version: 5.7.2 typescript-eslint: - specifier: ^8.17.0 - version: 8.17.0(eslint@9.16.0)(typescript@5.7.2) + specifier: ^8.18.0 + version: 8.18.0(eslint@9.16.0)(typescript@5.7.2) packages: "@babel/runtime@7.26.0": @@ -285,9 +285,9 @@ packages: integrity: sha512-pu0K1jCIdnQ12aWNaAVU5bzi7Bd1w54J3ECgANPmYLtQKP0HBj2cE/5coBD66MT10xbtIuUr7tg0Shbsvk0mDA==, } - "@marijn/find-cluster-break@1.0.1": + "@marijn/find-cluster-break@1.0.2": resolution: { - integrity: sha512-7fYyBEBOve5UILdtTr5GnfObe5Jmi8wKwooZ6da1zCr5HZAqweDqvG4ZryVRBjfUDQr2fS8VCnBMiSCX77qt9A==, + integrity: sha512-l0h88YhZFyKdXIFNfSWpyjStDjGHwZ/U7iobcK1cQQD8sejsONdQtTVU+1wVN1PBw40PiiHB1vA5S7VTfQiP9g==, } "@napi-rs/nice-android-arm-eabi@1.0.1": @@ -627,81 +627,66 @@ packages: integrity: sha512-wz7kjjRRj8/Lty4B+Kr0LN6Ypc/3SymeCCGSbaXp2leH0ZVg/PriNiOwNj4bD4uphI7A8NXS4b6Gl373sfO5mA==, } - "@typescript-eslint/eslint-plugin@8.17.0": + "@typescript-eslint/eslint-plugin@8.18.0": resolution: { - integrity: sha512-HU1KAdW3Tt8zQkdvNoIijfWDMvdSweFYm4hWh+KwhPstv+sCmWb89hCIP8msFm9N1R/ooh9honpSuvqKWlYy3w==, + integrity: sha512-NR2yS7qUqCL7AIxdJUQf2MKKNDVNaig/dEB0GBLU7D+ZdHgK1NoH/3wsgO3OnPVipn51tG3MAwaODEGil70WEw==, } engines: { node: ^18.18.0 || ^20.9.0 || >=21.1.0 } peerDependencies: "@typescript-eslint/parser": ^8.0.0 || ^8.0.0-alpha.0 eslint: ^8.57.0 || ^9.0.0 - typescript: "*" - peerDependenciesMeta: - typescript: - optional: true + typescript: ">=4.8.4 <5.8.0" - "@typescript-eslint/parser@8.17.0": + "@typescript-eslint/parser@8.18.0": resolution: { - integrity: sha512-Drp39TXuUlD49F7ilHHCG7TTg8IkA+hxCuULdmzWYICxGXvDXmDmWEjJYZQYgf6l/TFfYNE167m7isnc3xlIEg==, + integrity: sha512-hgUZ3kTEpVzKaK3uNibExUYm6SKKOmTU2BOxBSvOYwtJEPdVQ70kZJpPjstlnhCHcuc2WGfSbpKlb/69ttyN5Q==, } engines: { node: ^18.18.0 || ^20.9.0 || >=21.1.0 } peerDependencies: eslint: ^8.57.0 || ^9.0.0 - typescript: "*" - peerDependenciesMeta: - typescript: - optional: true + typescript: ">=4.8.4 <5.8.0" - "@typescript-eslint/scope-manager@8.17.0": + "@typescript-eslint/scope-manager@8.18.0": resolution: { - integrity: sha512-/ewp4XjvnxaREtqsZjF4Mfn078RD/9GmiEAtTeLQ7yFdKnqwTOgRMSvFz4et9U5RiJQ15WTGXPLj89zGusvxBg==, + integrity: sha512-PNGcHop0jkK2WVYGotk/hxj+UFLhXtGPiGtiaWgVBVP1jhMoMCHlTyJA+hEj4rszoSdLTK3fN4oOatrL0Cp+Xw==, } engines: { node: ^18.18.0 || ^20.9.0 || >=21.1.0 } - "@typescript-eslint/type-utils@8.17.0": + "@typescript-eslint/type-utils@8.18.0": resolution: { - integrity: sha512-q38llWJYPd63rRnJ6wY/ZQqIzPrBCkPdpIsaCfkR3Q4t3p6sb422zougfad4TFW9+ElIFLVDzWGiGAfbb/v2qw==, + integrity: sha512-er224jRepVAVLnMF2Q7MZJCq5CsdH2oqjP4dT7K6ij09Kyd+R21r7UVJrF0buMVdZS5QRhDzpvzAxHxabQadow==, } engines: { node: ^18.18.0 || ^20.9.0 || >=21.1.0 } peerDependencies: eslint: ^8.57.0 || ^9.0.0 - typescript: "*" - peerDependenciesMeta: - typescript: - optional: true + typescript: ">=4.8.4 <5.8.0" - "@typescript-eslint/types@8.17.0": + "@typescript-eslint/types@8.18.0": resolution: { - integrity: sha512-gY2TVzeve3z6crqh2Ic7Cr+CAv6pfb0Egee7J5UAVWCpVvDI/F71wNfolIim4FE6hT15EbpZFVUj9j5i38jYXA==, + integrity: sha512-FNYxgyTCAnFwTrzpBGq+zrnoTO4x0c1CKYY5MuUTzpScqmY5fmsh2o3+57lqdI3NZucBDCzDgdEbIaNfAjAHQA==, } engines: { node: ^18.18.0 || ^20.9.0 || >=21.1.0 } - "@typescript-eslint/typescript-estree@8.17.0": + "@typescript-eslint/typescript-estree@8.18.0": resolution: { - integrity: sha512-JqkOopc1nRKZpX+opvKqnM3XUlM7LpFMD0lYxTqOTKQfCWAmxw45e3qlOCsEqEB2yuacujivudOFpCnqkBDNMw==, + integrity: sha512-rqQgFRu6yPkauz+ms3nQpohwejS8bvgbPyIDq13cgEDbkXt4LH4OkDMT0/fN1RUtzG8e8AKJyDBoocuQh8qNeg==, } engines: { node: ^18.18.0 || ^20.9.0 || >=21.1.0 } peerDependencies: - typescript: "*" - peerDependenciesMeta: - typescript: - optional: true + typescript: ">=4.8.4 <5.8.0" - "@typescript-eslint/utils@8.17.0": + "@typescript-eslint/utils@8.18.0": resolution: { - integrity: sha512-bQC8BnEkxqG8HBGKwG9wXlZqg37RKSMY7v/X8VEWD8JG2JuTHuNK0VFvMPMUKQcbk6B+tf05k+4AShAEtCtJ/w==, + integrity: sha512-p6GLdY383i7h5b0Qrfbix3Vc3+J2k6QWw6UMUeY5JGfm3C5LbZ4QIZzJNoNOfgyRe0uuYKjvVOsO/jD4SJO+xg==, } engines: { node: ^18.18.0 || ^20.9.0 || >=21.1.0 } peerDependencies: eslint: ^8.57.0 || ^9.0.0 - typescript: "*" - peerDependenciesMeta: - typescript: - optional: true + typescript: ">=4.8.4 <5.8.0" - "@typescript-eslint/visitor-keys@8.17.0": + "@typescript-eslint/visitor-keys@8.18.0": resolution: { - integrity: sha512-1Hm7THLpO6ww5QU6H/Qp+AusUUl+z/CAm3cNZZ0jQvon9yicgO7Rwd+/WWRpMKLYV6p2UvdbR27c86rzCPpreg==, + integrity: sha512-pCh/qEA8Lb1wVIqNvBke8UaRjJ6wrAWkJO5yyIbs8Yx6TNGYyfNjOo61tLv+WwLvoLPp4BQ8B7AHKijl8NGUfw==, } engines: { node: ^18.18.0 || ^20.9.0 || >=21.1.0 } @@ -2378,17 +2363,14 @@ packages: } engines: { node: ">= 0.8.0" } - typescript-eslint@8.17.0: + typescript-eslint@8.18.0: resolution: { - integrity: sha512-409VXvFd/f1br1DCbuKNFqQpXICoTB+V51afcwG1pn1a3Cp92MqAUges3YjwEdQ0cMUoCIodjVDAYzyD8h3SYA==, + integrity: sha512-Xq2rRjn6tzVpAyHr3+nmSg1/9k9aIHnJ2iZeOH7cfGOWqTkXTm3kwpQglEuLGdNrYvPF+2gtAs+/KF5rjVo+WQ==, } engines: { node: ^18.18.0 || ^20.9.0 || >=21.1.0 } peerDependencies: eslint: ^8.57.0 || ^9.0.0 - typescript: "*" - peerDependenciesMeta: - typescript: - optional: true + typescript: ">=4.8.4 <5.8.0" typescript@5.7.2: resolution: { @@ -2560,7 +2542,7 @@ snapshots: "@codemirror/state@6.5.0": dependencies: - "@marijn/find-cluster-break": 1.0.1 + "@marijn/find-cluster-break": 1.0.2 "@codemirror/view@6.35.3": dependencies: @@ -2674,7 +2656,7 @@ snapshots: dependencies: "@lezer/common": 1.2.3 - "@marijn/find-cluster-break@1.0.1": {} + "@marijn/find-cluster-break@1.0.2": {} "@napi-rs/nice-android-arm-eabi@1.0.1": optional: true @@ -2861,86 +2843,81 @@ snapshots: "@types/webpack-env@1.18.5": {} - "@typescript-eslint/eslint-plugin@8.17.0(@typescript-eslint/parser@8.17.0(eslint@9.16.0)(typescript@5.7.2))(eslint@9.16.0)(typescript@5.7.2)": + "@typescript-eslint/eslint-plugin@8.18.0(@typescript-eslint/parser@8.18.0(eslint@9.16.0)(typescript@5.7.2))(eslint@9.16.0)(typescript@5.7.2)": dependencies: "@eslint-community/regexpp": 4.12.1 - "@typescript-eslint/parser": 8.17.0(eslint@9.16.0)(typescript@5.7.2) - "@typescript-eslint/scope-manager": 8.17.0 - "@typescript-eslint/type-utils": 8.17.0(eslint@9.16.0)(typescript@5.7.2) - "@typescript-eslint/utils": 8.17.0(eslint@9.16.0)(typescript@5.7.2) - "@typescript-eslint/visitor-keys": 8.17.0 + "@typescript-eslint/parser": 8.18.0(eslint@9.16.0)(typescript@5.7.2) + "@typescript-eslint/scope-manager": 8.18.0 + "@typescript-eslint/type-utils": 8.18.0(eslint@9.16.0)(typescript@5.7.2) + "@typescript-eslint/utils": 8.18.0(eslint@9.16.0)(typescript@5.7.2) + "@typescript-eslint/visitor-keys": 8.18.0 eslint: 9.16.0 graphemer: 1.4.0 ignore: 5.3.2 natural-compare: 1.4.0 ts-api-utils: 1.4.3(typescript@5.7.2) - optionalDependencies: typescript: 5.7.2 transitivePeerDependencies: - supports-color - "@typescript-eslint/parser@8.17.0(eslint@9.16.0)(typescript@5.7.2)": + "@typescript-eslint/parser@8.18.0(eslint@9.16.0)(typescript@5.7.2)": dependencies: - "@typescript-eslint/scope-manager": 8.17.0 - "@typescript-eslint/types": 8.17.0 - "@typescript-eslint/typescript-estree": 8.17.0(typescript@5.7.2) - "@typescript-eslint/visitor-keys": 8.17.0 + "@typescript-eslint/scope-manager": 8.18.0 + "@typescript-eslint/types": 8.18.0 + "@typescript-eslint/typescript-estree": 8.18.0(typescript@5.7.2) + "@typescript-eslint/visitor-keys": 8.18.0 debug: 4.4.0 eslint: 9.16.0 - optionalDependencies: typescript: 5.7.2 transitivePeerDependencies: - supports-color - "@typescript-eslint/scope-manager@8.17.0": + "@typescript-eslint/scope-manager@8.18.0": dependencies: - "@typescript-eslint/types": 8.17.0 - "@typescript-eslint/visitor-keys": 8.17.0 + "@typescript-eslint/types": 8.18.0 + "@typescript-eslint/visitor-keys": 8.18.0 - "@typescript-eslint/type-utils@8.17.0(eslint@9.16.0)(typescript@5.7.2)": + "@typescript-eslint/type-utils@8.18.0(eslint@9.16.0)(typescript@5.7.2)": dependencies: - "@typescript-eslint/typescript-estree": 8.17.0(typescript@5.7.2) - "@typescript-eslint/utils": 8.17.0(eslint@9.16.0)(typescript@5.7.2) + "@typescript-eslint/typescript-estree": 8.18.0(typescript@5.7.2) + "@typescript-eslint/utils": 8.18.0(eslint@9.16.0)(typescript@5.7.2) debug: 4.4.0 eslint: 9.16.0 ts-api-utils: 1.4.3(typescript@5.7.2) - optionalDependencies: typescript: 5.7.2 transitivePeerDependencies: - supports-color - "@typescript-eslint/types@8.17.0": {} + "@typescript-eslint/types@8.18.0": {} - "@typescript-eslint/typescript-estree@8.17.0(typescript@5.7.2)": + "@typescript-eslint/typescript-estree@8.18.0(typescript@5.7.2)": dependencies: - "@typescript-eslint/types": 8.17.0 - "@typescript-eslint/visitor-keys": 8.17.0 + "@typescript-eslint/types": 8.18.0 + "@typescript-eslint/visitor-keys": 8.18.0 debug: 4.4.0 fast-glob: 3.3.2 is-glob: 4.0.3 minimatch: 9.0.5 semver: 7.6.3 ts-api-utils: 1.4.3(typescript@5.7.2) - optionalDependencies: typescript: 5.7.2 transitivePeerDependencies: - supports-color - "@typescript-eslint/utils@8.17.0(eslint@9.16.0)(typescript@5.7.2)": + "@typescript-eslint/utils@8.18.0(eslint@9.16.0)(typescript@5.7.2)": dependencies: "@eslint-community/eslint-utils": 4.4.1(eslint@9.16.0) - "@typescript-eslint/scope-manager": 8.17.0 - "@typescript-eslint/types": 8.17.0 - "@typescript-eslint/typescript-estree": 8.17.0(typescript@5.7.2) + "@typescript-eslint/scope-manager": 8.18.0 + "@typescript-eslint/types": 8.18.0 + "@typescript-eslint/typescript-estree": 8.18.0(typescript@5.7.2) eslint: 9.16.0 - optionalDependencies: typescript: 5.7.2 transitivePeerDependencies: - supports-color - "@typescript-eslint/visitor-keys@8.17.0": + "@typescript-eslint/visitor-keys@8.18.0": dependencies: - "@typescript-eslint/types": 8.17.0 + "@typescript-eslint/types": 8.18.0 eslint-visitor-keys: 4.2.0 "@xhmikosr/archive-type@7.0.0": @@ -4252,13 +4229,12 @@ snapshots: dependencies: prelude-ls: 1.2.1 - typescript-eslint@8.17.0(eslint@9.16.0)(typescript@5.7.2): + typescript-eslint@8.18.0(eslint@9.16.0)(typescript@5.7.2): dependencies: - "@typescript-eslint/eslint-plugin": 8.17.0(@typescript-eslint/parser@8.17.0(eslint@9.16.0)(typescript@5.7.2))(eslint@9.16.0)(typescript@5.7.2) - "@typescript-eslint/parser": 8.17.0(eslint@9.16.0)(typescript@5.7.2) - "@typescript-eslint/utils": 8.17.0(eslint@9.16.0)(typescript@5.7.2) + "@typescript-eslint/eslint-plugin": 8.18.0(@typescript-eslint/parser@8.18.0(eslint@9.16.0)(typescript@5.7.2))(eslint@9.16.0)(typescript@5.7.2) + "@typescript-eslint/parser": 8.18.0(eslint@9.16.0)(typescript@5.7.2) + "@typescript-eslint/utils": 8.18.0(eslint@9.16.0)(typescript@5.7.2) eslint: 9.16.0 - optionalDependencies: typescript: 5.7.2 transitivePeerDependencies: - supports-color diff --git a/templates/admin/statistics/experience_points.html.twig b/templates/admin/statistics/experience_points.html.twig index 2f84374..1628b59 100644 --- a/templates/admin/statistics/experience_points.html.twig +++ b/templates/admin/statistics/experience_points.html.twig @@ -1,6 +1,6 @@ {% extends '@EasyAdmin/page/content.html.twig' %} -{% block content_title %}統計資料 – 上次登入時間{% endblock %} +{% block content_title %}統計資料 – 經驗值{% endblock %} {% block main %} diff --git a/templates/admin/statistics/last_login_at.html.twig b/templates/admin/statistics/last_login_at.html.twig index 7091d94..c629bd6 100644 --- a/templates/admin/statistics/last_login_at.html.twig +++ b/templates/admin/statistics/last_login_at.html.twig @@ -1,13 +1,13 @@ {% extends '@EasyAdmin/page/content.html.twig' %} -{% block content_title %}統計資料 – 上次登入時間{% endblock %} +{% block content_title %}統計資料 – 最近登入時間{% endblock %} {% block main %}
- + diff --git a/zeabur/app.yaml b/zeabur/app.yaml new file mode 100644 index 0000000..53ea662 --- /dev/null +++ b/zeabur/app.yaml @@ -0,0 +1,279 @@ +# yaml-language-server: $schema=https://schema.zeabur.app/template.json +apiVersion: zeabur.com/v1 +kind: Template +metadata: + name: database-playground-main +spec: + description: The main applications of Database Playground + icon: https://s3.dbplay.pan93.com/icon.svg + services: + - name: postgresql + icon: https://raw.githubusercontent.com/zeabur/service-icons/main/marketplace/postgresql.svg + template: PREBUILT_V2 + spec: + source: + image: docker.io/pgautoupgrade/pgautoupgrade:17-alpine + command: + - docker-entrypoint.sh + - -c + - config_file=/etc/postgresql/postgresql.conf + ports: + - id: database + port: 5432 + type: TCP + volumes: + - id: data + dir: /var/lib/postgresql/data + instructions: + - type: TEXT + title: Connection String + content: postgresql://${POSTGRES_USERNAME}:${POSTGRES_PASSWORD}@${PORT_FORWARDED_HOSTNAME}:${DATABASE_PORT_FORWARDED_PORT}/${POSTGRES_DATABASE} + - type: TEXT + title: PostgreSQL Connect Command + content: psql "postgresql://${POSTGRES_USERNAME}:${POSTGRES_PASSWORD}@${PORT_FORWARDED_HOSTNAME}:${DATABASE_PORT_FORWARDED_PORT}/${POSTGRES_DATABASE}" + - type: TEXT + title: PostgreSQL username + content: ${POSTGRES_USERNAME} + category: Credentials + - type: PASSWORD + title: PostgresSQL password + content: ${POSTGRES_PASSWORD} + category: Credentials + - type: TEXT + title: PostgresSQL database + content: ${POSTGRES_DATABASE} + category: Credentials + - type: TEXT + title: PostgreSQL host + content: ${PORT_FORWARDED_HOSTNAME} + category: Hostname & Port + - type: TEXT + title: PostgreSQL port + content: ${DATABASE_PORT_FORWARDED_PORT} + category: Hostname & Port + env: + PGDATA: + default: /var/lib/postgresql/data/pgdata + expose: false + POSTGRES_CONNECTION_STRING: + default: postgresql://${POSTGRES_USERNAME}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DATABASE} + expose: true + POSTGRES_DATABASE: + default: ${POSTGRES_DB} + expose: true + POSTGRES_DB: + default: zeabur + expose: false + POSTGRES_HOST: + default: ${CONTAINER_HOSTNAME} + expose: true + POSTGRES_PASSWORD: + default: ${PASSWORD} + expose: true + POSTGRES_PORT: + default: ${DATABASE_PORT} + expose: true + POSTGRES_URI: + default: ${POSTGRES_CONNECTION_STRING} + expose: true + POSTGRES_USER: + default: root + expose: false + POSTGRES_USERNAME: + default: ${POSTGRES_USER} + expose: true + configs: + - path: /etc/postgresql/postgresql.conf + template: | + # https://github.com/postgres/postgres/blob/master/src/backend/utils/misc/postgresql.conf.sample + listen_addresses = '*' + max_connections = 100 + shared_buffers = 128MB + dynamic_shared_memory_type = posix + max_wal_size = 1GB + min_wal_size = 80MB + log_timezone = 'Etc/UTC' + datestyle = 'iso, mdy' + timezone = 'Etc/UTC' + lc_messages = 'en_US.utf8' + lc_monetary = 'en_US.utf8' + lc_numeric = 'en_US.utf8' + lc_time = 'en_US.utf8' + default_text_search_config = 'pg_catalog.english' + permission: null + envsubst: null + - name: redis + icon: https://raw.githubusercontent.com/zeabur/service-icons/main/marketplace/redis.svg + template: PREBUILT_V2 + spec: + source: + image: redis/redis-stack-server:latest + ports: + - id: database + port: 6379 + type: TCP + volumes: + - id: data + dir: /data + instructions: + - type: TEXT + title: Command to connect to your Redis + content: redis-cli -h ${PORT_FORWARDED_HOSTNAME} -p ${DATABASE_PORT_FORWARDED_PORT} -a ${REDIS_PASSWORD} + - type: TEXT + title: Redis Connection String + content: redis://:${REDIS_PASSWORD}@${PORT_FORWARDED_HOSTNAME}:${DATABASE_PORT_FORWARDED_PORT} + - type: PASSWORD + title: Redis password + content: ${REDIS_PASSWORD} + category: Credentials + - type: TEXT + title: Redis host + content: ${PORT_FORWARDED_HOSTNAME} + category: Hostname & Port + - type: TEXT + title: Redis port + content: ${DATABASE_PORT_FORWARDED_PORT} + category: Hostname & Port + env: + CONFFILE: + default: /etc/redis-stack.conf + expose: false + REDIS_ARGS: + default: --requirepass ${REDIS_PASSWORD} + expose: false + REDIS_CONNECTION_STRING: + default: redis://:${REDIS_PASSWORD}@${REDIS_HOST}:${REDIS_PORT} + expose: true + REDIS_HOST: + default: ${CONTAINER_HOSTNAME} + expose: true + REDIS_PASSWORD: + default: ${PASSWORD} + expose: true + REDIS_PORT: + default: ${DATABASE_PORT} + expose: true + REDIS_URI: + default: ${REDIS_CONNECTION_STRING} + expose: true + configs: + - path: /etc/redis-stack.conf + template: | + port 6379 + daemonize no + permission: null + envsubst: null + - name: meilisearch + icon: https://www.meilisearch.com/favicon.svg + template: PREBUILT_V2 + spec: + source: + image: getmeili/meilisearch + ports: + - id: web + port: 7700 + type: HTTP + volumes: + - id: data + dir: /meili_data + instructions: + - type: PASSWORD + title: Meilisearch Master Key + content: ${MEILI_MASTER_KEY} + category: Credentials + env: + MEILI_MASTER_KEY: + default: ${PASSWORD} + expose: true + configs: [] + - name: sqlrunner + icon: https://upload.wikimedia.org/wikipedia/commons/9/97/Sqlite-square-icon.svg + template: PREBUILT_V2 + spec: + source: + image: ghcr.io/database-playground/sqlrunner-v2:main + ports: + - id: web + port: 8080 + type: HTTP + configs: [] + - name: app + icon: https://s3.dbplay.pan93.com/icon.svg + template: PREBUILT_V2 + spec: + source: + image: ghcr.io/database-playground/app-sf:master + ports: + - id: web + port: 3000 + type: HTTP + env: + APP_SECRET: + default: ${PASSWORD} + DATABASE_URL: + default: postgresql://${POSTGRES_USERNAME}:${POSTGRES_PASSWORD}@postgresql.zeabur.internal:5432/${POSTGRES_DATABASE}?serverVersion=17&charset=utf8 + expose: true + LINE_NOTIFY_DSN: + default: linenotify://@default + expose: true + MEILISEARCH_API_KEY: + default: ${MEILI_MASTER_KEY} + expose: true + MEILISEARCH_URL: + default: http://meilisearch.zeabur.internal:7700 + expose: true + OPENAI_API_KEY: + default: + expose: true + REDIS_URI: + default: ${REDIS_CONNECTION_STRING} + expose: true + SERVER_NAME: + default: :3000 + expose: false + SQLRUNNER_URL: + default: http://sqlrunner.zeabur.internal:8080 + expose: true + UMAMI_DOMAIN: + default: + expose: false + UMAMI_WEBSITE_ID: + default: + expose: false + MESSENGER_TRANSPORT_DSN: + default: ${REDIS_URI}/messages + expose: true + configs: [] + - name: worker-1 + icon: https://s3.dbplay.pan93.com/icon.svg + template: PREBUILT_V2 + spec: + source: + image: ghcr.io/database-playground/app-sf-worker:master + env: + MESSENGER_CONSUMER_NAME: + default: app-sf-worker-1 + expose: false + configs: [] + - name: worker-2 + icon: https://s3.dbplay.pan93.com/icon.svg + template: PREBUILT_V2 + spec: + source: + image: ghcr.io/database-playground/app-sf-worker:master + env: + MESSENGER_CONSUMER_NAME: + default: app-sf-worker-2 + expose: false + configs: [] + - name: worker-3 + icon: https://s3.dbplay.pan93.com/icon.svg + template: PREBUILT_V2 + spec: + source: + image: ghcr.io/database-playground/app-sf-worker:master + env: + MESSENGER_CONSUMER_NAME: + default: app-sf-worker-3 + expose: false + configs: [] diff --git a/zeabur/monitor.yaml b/zeabur/monitor.yaml new file mode 100644 index 0000000..8a638ef --- /dev/null +++ b/zeabur/monitor.yaml @@ -0,0 +1,80 @@ +# yaml-language-server: $schema=https://schema.zeabur.app/template.json +apiVersion: zeabur.com/v1 +kind: Template +metadata: + name: database-playground-uptime +spec: + description: Uptime monitor of the database playground + icon: https://github.com/louislam/uptime-kuma/raw/master/public/icon.svg + services: + - name: uptime + icon: https://github.com/louislam/uptime-kuma/raw/master/public/icon.svg + template: PREBUILT_V2 + spec: + source: + image: louislam/uptime-kuma:1 + ports: + - id: web + port: 3001 + type: HTTP + volumes: + - id: data + dir: /app/data + configs: [] + - name: worker-monitor-1 + template: GIT + spec: + source: + source: GITHUB + repo: 901414454 + branch: main + rootDirectory: / + env: + MONITOR_ENVIRONMENT_ID: + default: + expose: false + MONITOR_SERVICE_ID: + default: + expose: false + MONITOR_ZEABUR_TOKEN: + default: + expose: false + configs: [] + - name: worker-monitor-2 + template: GIT + spec: + source: + source: GITHUB + repo: 901414454 + branch: main + rootDirectory: / + env: + MONITOR_ENVIRONMENT_ID: + default: + expose: false + MONITOR_SERVICE_ID: + default: + expose: false + MONITOR_ZEABUR_TOKEN: + default: + expose: false + configs: [] + - name: worker-monitor-3 + template: GIT + spec: + source: + source: GITHUB + repo: 901414454 + branch: main + rootDirectory: / + env: + MONITOR_ENVIRONMENT_ID: + default: + expose: false + MONITOR_SERVICE_ID: + default: + expose: false + MONITOR_ZEABUR_TOKEN: + default: + expose: false + configs: []
帳號上次登入時間最近登入時間 距今天數