-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: 🤖 zeabur template for Typesense #18
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# Zeabur | ||
|
||
## Typesense Template | ||
|
||
```sh | ||
npx zeabur template update -c FTAONK -f typesense-template.yaml | ||
``` | ||
|
||
docs: | ||
|
||
- https://zeabur.com/docs/template/template-in-code | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# yaml-language-server: $schema=https://schema.zeabur.app/template.json | ||
apiVersion: zeabur.com/v1 | ||
kind: Template | ||
metadata: | ||
name: Typesense | ||
spec: | ||
description: Fast, open source, typo-tolerant search engine | ||
icon: "https://typesense.org/docs/images/typesense_logo.svg" | ||
services: | ||
- name: typesense | ||
icon: https://typesense.org/docs/images/typesense_logo.svg | ||
template: PREBUILT_V2 | ||
spec: | ||
source: | ||
image: typesense/typesense:27.1 | ||
ports: | ||
- id: web | ||
port: 8108 | ||
type: HTTP | ||
volumes: | ||
- id: data | ||
dir: /data | ||
env: | ||
TYPESENSE_API_KEY: | ||
default: "xyz" | ||
expose: false | ||
TYPESENSE_DATA_DIR: | ||
default: /data | ||
expose: false | ||
configs: [] | ||
Comment on lines
+23
to
+30
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Security concern: Remove the default API key. The environment variables are correctly set and not exposed, which is good for security. However, there's a significant security risk in the current configuration. The default value "xyz" for TYPESENSE_API_KEY is insecure. Hardcoding API keys, even as defaults, can lead to accidental exposure of the key if not changed during deployment. Consider the following improvements:
Here's an example of how you might modify the TYPESENSE_API_KEY configuration: TYPESENSE_API_KEY:
# Uncomment and set a strong, unique API key during deployment
# default: ""
expose: false Additionally, consider adding a validation step in your deployment process to ensure a proper API key is set before the service starts. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Format the documentation link as a proper Markdown link
The documentation link is useful, but it's currently formatted as a bare URL. To improve readability and follow Markdown best practices, consider formatting it as a proper Markdown link with descriptive text.
Here's a suggested revision:
📝 Committable suggestion
🧰 Tools
🪛 Markdownlint