Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

feat: add hex magic env var

Andras Bacsai7f0094ed553a
diff --git a/bootstrap/helpers/shared.php b/bootstrap/helpers/shared.php
index dc49247892..1a943cd734 100644
--- a/bootstrap/helpers/shared.php
+++ b/bootstrap/helpers/shared.php
@@ -940,6 +940,15 @@ function generateEnvValue(string $command, Service|Application|null $service = n
case 'REALBASE64_32':
$generatedValue = base64_encode(Str::random(32));
break;
+ case 'HEX_32':
+ $generatedValue = bin2hex(Str::random(32));
+ break;
+ case 'HEX_64':
+ $generatedValue = bin2hex(Str::random(64));
+ break;
+ case 'HEX_128':
+ $generatedValue = bin2hex(Str::random(128));
+ break;
case 'USER':
$generatedValue = Str::random(16);
break;
diff --git a/resources/views/livewire/project/service/edit-compose.blade.php b/resources/views/livewire/project/service/edit-compose.blade.php
index 3b1e1a3bc6..a99c117fbe 100644
--- a/resources/views/livewire/project/service/edit-compose.blade.php
+++ b/resources/views/livewire/project/service/edit-compose.blade.php
@@ -13,7 +13,7 @@
<x-forms.textarea rows="20" readonly id="service.docker_compose">
</x-forms.textarea>
</div>
- <div class="pt-2 w-72">
+ <div class="pt-2 w-96">
<x-forms.checkbox label="Escape special characters in labels?"
helper="By default, $ (and other chars) is escaped. So if you write $ in the labels, it will be saved as $$.<br><br>If you want to use env variables inside the labels, turn this off."
id="service.is_container_label_escape_enabled" instantSave></x-forms.checkbox>
diff --git a/resources/views/livewire/project/shared/environment-variable/all.blade.php b/resources/views/livewire/project/shared/environment-variable/all.blade.php
index deb785caa1..38ea192b55 100644
--- a/resources/views/livewire/project/shared/environment-variable/all.blade.php
+++ b/resources/views/livewire/project/shared/environment-variable/all.blade.php
@@ -3,7 +3,7 @@
<div class="flex items-center gap-2">
<h2>Environment Variables</h2>
<div class="flex flex-col items-center">
- <x-modal-input buttonTitle="+ Add" title="New Environment Variable">
+ <x-modal-input buttonTitle="+ Add" title="New Environment Variable" :closeOutside="false">
<livewire:project.shared.environment-variable.add />
</x-modal-input>
</div>
@@ -38,7 +38,7 @@
<div>Environment (secrets) variables for Production.</div>
</div>
@php
- $requiredEmptyVars = $resource->environment_variables->filter(function($env) {
+ $requiredEmptyVars = $resource->environment_variables->filter(function ($env) {
return $env->is_required && empty($env->value);
});
$otherVars = $resource->environment_variables->diff($requiredEmptyVars);
@@ -62,11 +62,13 @@
@endif
@else
<form wire:submit.prevent='submit' class="flex flex-col gap-2">
- <x-forms.textarea rows="10" class="whitespace-pre-wrap" id="variables" wire:model="variables" label="Production Environment Variables"></x-forms.textarea>
+ <x-forms.textarea rows="10" class="whitespace-pre-wrap" id="variables" wire:model="variables"
+ label="Production Environment Variables"></x-forms.textarea>
@if ($showPreview)
- <x-forms.textarea rows="10" class="whitespace-pre-wrap" label="Preview Deployments Environment Variables"
- id="variablesPreview" wire:model="variablesPreview"></x-forms.textarea>
+ <x-forms.textarea rows="10" class="whitespace-pre-wrap"
+ label="Preview Deployments Environment Variables" id="variablesPreview"
+ wire:model="variablesPreview"></x-forms.textarea>
@endif
<x-forms.button type="submit" class="btn btn-primary">Save All Environment Variables</x-forms.button>
diff --git a/templates/compose/bluesky-pds.yaml b/templates/compose/bluesky-pds.yaml
new file mode 100644
index 0000000000..679eb8e79f
--- /dev/null
+++ b/templates/compose/bluesky-pds.yaml
@@ -0,0 +1,36 @@
+# ignore: true
+# documentation: https://github.com/bluesky-social/pds
+# slogan: A social network for the decentralized web
+# tags: pds, bluesky, social, network, decentralized
+# logo:
+# port: 3000
+
+services:
+ pds:
+ image: ghcr.io/bluesky-social/pds:0.4
+ volumes:
+ - pds-data:/pds
+ environment:
+ - SERVICE_FQDN_PDS_3000
+ - PDS_JWT_SECRET=${SERVICE_BASE64_PDS}
+ - PDS_ADMIN_PASSWORD=${SERVICE_PASSWORD_PDS}
+ - PDS_ADMIN_EMAIL=${PDS_ADMIN_EMAIL:[email protected]}
+ - PDS_DATADIR=${PDS_DATADIR:-/pds}
+ - PDS_BLOBSTORE_DISK_LOCATION=${PDS_DATADIR:-/pds}/blocks
+ - PDS_BLOB_UPLOAD_LIMIT=${PDS_BLOB_UPLOAD_LIMIT:-52428800}
+ - PDS_HOSTNAME=${SERVICE_URL_PDS}
+ - PDS_DID_PLC_URL=https://plc.directory
+ - PDS_BSKY_APP_VIEW_URL=https://api.bsky.app
+ - PDS_BSKY_APP_VIEW_DID=did:web:api.bsky.app
+ - PDS_REPORT_SERVICE_URL=https://mod.bsky.app
+ - PDS_REPORT_SERVICE_DID=did:plc:ar7c4by46qjdydhdevvrndac
+ - PDS_CRAWLERS=https://bsky.network
+ - LOG_ENABLED=${LOG_ENABLED:-true}
+ - PDS_EMAIL_SMTP_URL=${PDS_EMAIL_SMTP_URL:-smtp://localhost:8025}
+ - PDS_EMAIL_FROM_ADDRESS=${PDS_EMAIL_FROM_ADDRESS:[email protected]}
+ - PDS_PLC_ROTATION_KEY_K256_PRIVATE_KEY_HEX=${SERVICE_HEX_32_ROTATIONKEY}
+ healthcheck:
+ test: ["CMD", "wget", "--spider", "http://127.0.0.1:3000/xrpc/_health"]
+ interval: 2s
+ timeout: 10s
+ retries: 10