# yaml-language-server: $schema=https://schema.zeabur.app/template.json
apiVersion: zeabur.com/v1
kind: Template
metadata:
    name: PasswordPusher
spec:
    description: Simple & Secure Password Sharing with Auto-Expiration of Shared Items
    coverImage: https://camo.githubusercontent.com/8d8f8d9bfabbb546a7ed715926ea5775794b773e24db15b8b8a08919c7c4ca0c/68747470733a2f2f7077707573682e667261312e63646e2e6469676974616c6f6365616e7370616365732e636f6d2f6272616e64696e672f6c6f676f732f686f72697a6f6e74616c2d6c6f676f2d736d616c6c2e706e67
    icon: https://cdn.zeabur.com/prebuilt.svg
    tags:
        - Tool
    readme: |-
        # Password Pusher
        Securely share sensitive information with automatic expiration & deletion after a set number of views or duration. Track who, what and when with full audit logs.
        Password Pusher is an open source application to communicate sensitive information over the web. Secret links expire after a certain number of views and/or time has passed.
        GIT URL	https://github.com/pglombardo/PasswordPusher
    services:
        - name: pwpush
          icon: https://cdn.zeabur.com/prebuilt.svg
          template: PREBUILT
          spec:
            id: pwpush
            source:
                image: pglombardo/pwpush:stable
            ports:
                - id: web
                  port: 5100
                  type: HTTP
            env:
                DATABASE_URL:
                    default: postgresql://${POSTGRES_USERNAME}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DATABASE}
                    expose: true
        - name: postgresql
          icon: https://cdn.zeabur.com/marketplace/postgresql.svg
          template: PREBUILT
          spec:
            id: postgresql
            source:
                image: postgres:17
                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:
                - title: Connection String
                  content: postgresql://${POSTGRES_USERNAME}:${POSTGRES_PASSWORD}@${PORT_FORWARDED_HOSTNAME}:${DATABASE_PORT_FORWARDED_PORT}/${POSTGRES_DATABASE}
                - title: PostgreSQL Connect Command
                  content: psql "postgresql://${POSTGRES_USERNAME}:${POSTGRES_PASSWORD}@${PORT_FORWARDED_HOSTNAME}:${DATABASE_PORT_FORWARDED_PORT}/${POSTGRES_DATABASE}"
                - title: PostgreSQL username
                  content: ${POSTGRES_USERNAME}
                - title: PostgresSQL password
                  content: ${POSTGRES_PASSWORD}
                - title: PostgresSQL database
                  content: ${POSTGRES_DATABASE}
                - title: PostgreSQL host
                  content: ${PORT_FORWARDED_HOSTNAME}
                - title: PostgreSQL port
                  content: ${DATABASE_PORT_FORWARDED_PORT}
            env:
                PGDATA:
                    default: /var/lib/postgresql/data/pgdata
                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: pwpush_db
                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: pwpush
                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
localization:
    ja-JP:
        description: シンプルで安全なパスワード共有機能、共有プロジェクトの自動期限切れ
        readme: |-
            # Password Pusher
            このイメージは機密情報を安全に共有し、設定された閲覧回数または持続時間後に自動的に期限切れになり削除されます。完全な監査ログでアクセス者・内容・時間を追跡します。
            Password Pusher はウェブ経由で機密情報を送信するためのオープンソースアプリケーションです。秘密リンクは指定された閲覧回数や時間経過後に無効化されます 。
            GIT URL	https://github.com/pglombardo/PasswordPusher
    zh-CN:
        description: 简单且安全的密码共享功能，共享项目自动过期
        readme: |-
            # Password Pusher
            这个镜像安全地分享敏感信息，在设定的浏览次数或持续时间后自动过期和删除。使用完整的审计日志跟踪人员、内容和时间。
            Password Pusher 是一个开源应用程序，用于通过 Web 传输敏感信息。秘密链接在经过一定数量的查看次数和/或时间后过期。
            GIT URL	https://github.com/pglombardo/PasswordPusher
    zh-TW:
        description: 簡單且安全的密碼共享功能，共享項目自動過期
        readme: |-
            # Password Pusher
            此鏡像安全地分享敏感資訊，在設定的瀏覽次數或持續時間後自動過期和刪除。使用完整的審計日誌追蹤人員、內容和時間。
            Password Pusher 是一個開源應用程式，用於透過網路傳輸敏感資訊。秘密連結在經過一定數量的檢視次數或時間後失效 。
            GIT URL	https://github.com/pglombardo/PasswordPusher
