diff --git a/public/templates/doublezero.svg b/public/templates/doublezero.svg new file mode 100644 index 00000000..e28cbeb0 --- /dev/null +++ b/public/templates/doublezero.svg @@ -0,0 +1,4 @@ + + + + diff --git a/templates/doublezero/docker-compose.yml b/templates/doublezero/docker-compose.yml new file mode 100644 index 00000000..bb7b1d2b --- /dev/null +++ b/templates/doublezero/docker-compose.yml @@ -0,0 +1,31 @@ +services: + doublezero: + restart: always + image: liltechnomancer/double-zero:0.2.1 + ports: + - ${DOUBLEZERO_PORT} + networks: + - dokploy-network + volumes: + - db-data:/var/lib/doublezero/data + environment: + AWS_ACCESS_KEY_ID: ${AWS_ACCESS_KEY_ID} + AWS_SECRET_ACCESS_KEY: ${AWS_SECRET_ACCESS_KEY} + AWS_REGION: ${AWS_REGION} + SQS_URL: ${SQS_URL} + SYSTEM_EMAIL: ${SYSTEM_EMAIL} + SECRET_KEY_BASE: ${SECRET_KEY_BASE} + PHX_HOST: ${DOUBLEZERO_HOST} + DATABASE_PATH: ./00.db + labels: + - "traefik.enable=true" + - "traefik.http.routers.${HASH}.rule=Host(`${DOUBLEZERO_HOST}`)" + - "traefik.http.services.${HASH}.loadbalancer.server.port=${DOUBLEZERO_PORT}" + +volumes: + db-data: + driver: local + +networks: + dokploy-network: + external: true diff --git a/templates/doublezero/index.ts b/templates/doublezero/index.ts new file mode 100644 index 00000000..72304728 --- /dev/null +++ b/templates/doublezero/index.ts @@ -0,0 +1,29 @@ +import { + generateHash, + generateRandomDomain, + type Template, + type Schema, + generateBase64, +} from "../utils"; + +export function generate(schema: Schema): Template { + const mainServiceHash = generateHash(schema.projectName); + const randomDomain = generateRandomDomain(schema); + const secretKeyBase = generateBase64(64); + + const envs = [ + `DOUBLEZERO_HOST=${randomDomain}`, + "DOUBLEZERO_PORT=4000", + `HASH=${mainServiceHash}`, + `SECRET_KEY_BASE=${secretKeyBase}`, + "AWS_ACCESS_KEY_ID=your-aws-access-key", + "AWS_SECRET_ACCESS_KEY=your-aws-secret-key", + "AWS_REGION=your-aws-region", + "SQS_URL=your-aws-sqs-url", + "SYSTEM_EMAIL=", + ]; + + return { + envs, + }; +} diff --git a/templates/templates.ts b/templates/templates.ts index 49bd596c..687576dd 100644 --- a/templates/templates.ts +++ b/templates/templates.ts @@ -331,5 +331,19 @@ export const templates: TemplateData[] = [ }, tags: ['chat'], load: () => import('./open-webui/index').then((m) => m.generate), + }, + { + id: 'doublezero', + name: 'Double Zero', + version: 'v0.2.1', + description: '00 is a self hostable SES dashboard for sending and monitoring emails with AWS', + logo: 'doublezero.svg', + links: { + github: 'https://github.com/technomancy-dev/00', + website: 'https://www.double-zero.cloud/', + docs: 'https://github.com/technomancy-dev/00', + }, + tags: ['email'], + load: () => import('./doublezero/index').then((m) => m.generate), } ];