mirror of
https://gitlab.com/soapbox-pub/ditto.git
synced 2025-12-06 11:29:46 +00:00
get latest soapbox, nsec from env
This commit is contained in:
parent
061dd38715
commit
d4c715199a
2 changed files with 5 additions and 4 deletions
|
|
@ -1,8 +1,10 @@
|
|||
FROM denoland/deno:1.44.2
|
||||
|
||||
ARG DITTO_NSEC
|
||||
ARG DITTO_DOMAIN
|
||||
ARG DITTO_UPLOADER_CONFIG
|
||||
|
||||
ENV DITTO_NSEC=${DITTO_NSEC}
|
||||
ENV DITTO_DOMAIN=${DITTO_DOMAIN}
|
||||
ENV DITTO_UPLOADER_CONFIG=${DITTO_UPLOADER_CONFIG}
|
||||
ENV PORT 5000
|
||||
|
|
@ -12,4 +14,5 @@ RUN mkdir -p data
|
|||
COPY . .
|
||||
RUN deno cache src/server.ts
|
||||
RUN deno task headless:setup
|
||||
RUN deno task soapbox
|
||||
CMD deno task start
|
||||
|
|
|
|||
|
|
@ -1,4 +1,3 @@
|
|||
import { generateSecretKey, nip19 } from 'nostr-tools';
|
||||
import { parseUploaderConfig } from './uploader-config.ts';
|
||||
|
||||
function scream(...args: any[]) {
|
||||
|
|
@ -11,9 +10,8 @@ function missingEnv(what: string, v: string) {
|
|||
}
|
||||
|
||||
if (import.meta.main) {
|
||||
const key = generateSecretKey();
|
||||
const DITTO_NSEC = nip19.nsecEncode(key);
|
||||
console.log('DITTO_NSEC: ', DITTO_NSEC);
|
||||
const DITTO_NSEC = Deno.env.get('DITTO_NSEC');
|
||||
if (!DITTO_NSEC) missingEnv('Ditto instance nsec', 'DITTO_NSEC');
|
||||
|
||||
const LOCAL_DOMAIN = Deno.env.get('DITTO_DOMAIN');
|
||||
if (!LOCAL_DOMAIN) missingEnv('Domain value', 'DITTO_DOMAIN');
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue