# yaml-language-server: $schema=https://schema.zeabur.app/template.json
apiVersion: zeabur.com/v1
kind: Template
metadata:
    name: JupyterLab
spec:
    description: A template to deploy JupyterLab, a web-based interactive development environment, using a custom Docker image.
    variables:
        - key: WEB_URL
          type: DOMAIN
          name: What is your domain for JupyterLab?
          description: Used to expose JupyterLab to the public web
    tags:
        - data-science
        - jupyter
        - interactive
    readme: |
        This template deploys [JupyterLab](https://jupyter.org/) using the custom Docker image `fuglelucas/juplabtest`. JupyterLab is a powerful tool for data science and development, running on port 8889.
    services:
        - name: JupyterLab
          icon: https://cdn.zeabur.com/prebuilt.svg
          template: PREBUILT_V2
          spec:
            source:
                image: fuglelucas/juplabtest:latest
                command:
                    - /bin/sh
                args:
                    - -c
                    - jupyter-lab --ip=0.0.0.0 --port=8889 --allow-root --notebook-dir=/data --no-browser
            ports:
                - id: web
                  port: 8889
                  type: HTTP
            volumes:
                - id: juptest
                  dir: /data
            env:
                JUPYTER_LAB_URL:
                    default: ${ZEABUR_WEB_URL}
                    expose: true
          domainKey: WEB_URL
