{"id":22908906,"url":"https://github.com/defanglabs/jupyter-postgres-demo","last_synced_at":"2025-04-01T09:59:22.004Z","repository":{"id":267006327,"uuid":"900001328","full_name":"DefangLabs/jupyter-postgres-demo","owner":"DefangLabs","description":null,"archived":false,"fork":false,"pushed_at":"2024-12-07T16:49:04.000Z","size":44,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-07T05:27:49.910Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DefangLabs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-07T15:44:52.000Z","updated_at":"2024-12-07T16:49:08.000Z","dependencies_parsed_at":"2024-12-07T17:17:46.005Z","dependency_job_id":"0a0eb68f-d390-4391-a7eb-439194d406be","html_url":"https://github.com/DefangLabs/jupyter-postgres-demo","commit_stats":null,"previous_names":["defanglabs/jupyter-postgres-demo"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DefangLabs%2Fjupyter-postgres-demo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DefangLabs%2Fjupyter-postgres-demo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DefangLabs%2Fjupyter-postgres-demo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DefangLabs%2Fjupyter-postgres-demo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DefangLabs","download_url":"https://codeload.github.com/DefangLabs/jupyter-postgres-demo/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246620260,"owners_count":20806722,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-14T03:33:13.347Z","updated_at":"2025-04-01T09:59:21.977Z","avatar_url":"https://github.com/DefangLabs.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Jupyter \u0026 Postgres\n\n[![1-click-deploy](https://defang.io/deploy-with-defang.png)](https://portal.defang.dev/redirect?url=https%3A%2F%2Fgithub.com%2Fnew%3Ftemplate_name%3Dsample-jupyter-postgres-template%26template_owner%3DDefangSamples)\n\nThis sample shows you how to spin up a postgres database and a Jupyter notebook server. This is useful if you want to use Jupyter notebooks to read data from or persist data to a database.\n\n## Prerequisites\n\n1. Download [Defang CLI](https://github.com/DefangLabs/defang)\n2. (Optional) If you are using [Defang BYOC](https://docs.defang.io/docs/concepts/defang-byoc) authenticate with your cloud provider account\n3. (Optional for local development) [Docker CLI](https://docs.docker.com/engine/install/)\n\n## Development\n\nTo run the application locally, you can use the following command:\n\n```bash\ndocker compose -f compose.dev.yaml up --build\n```\n\n## Configuration\n\nFor this sample, you will need to provide the following [configuration](https://docs.defang.io/docs/concepts/configuration): \n\n\u003e Note that if you are using the 1-click deploy option, you can set these values as secrets in your GitHub repository and the action will automatically deploy them for you.\n\n### `POSTGRES_PASSWORD`\nThe password to use for the postgres database.\n```bash\ndefang config set POSTGRES_PASSWORD\n```\n\n### `JUPYTER_TOKEN`\nThe token to access your Jupyter notebook server.\n```bash\ndefang config set JUPYTER_TOKEN\n```\n\n## Deployment\n\n\u003e [!NOTE]\n\u003e Download [Defang CLI](https://github.com/DefangLabs/defang)\n\n### Defang Playground\n\nDeploy your application to the Defang Playground by opening up your terminal and typing:\n```bash\ndefang compose up\n```\n\n### BYOC (AWS)\n\nIf you want to deploy to your own cloud account, you can use Defang BYOC:\n\n1. [Authenticate your AWS account](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html), and check that you have properly set your environment variables like `AWS_PROFILE`, `AWS_REGION`, `AWS_ACCESS_KEY_ID`, and `AWS_SECRET_ACCESS_KEY`.\n2. Run in a terminal that has access to your AWS environment variables:\n    ```bash\n    defang --provider=aws compose up\n    ```\n\n---\n\nTitle: Jupyter \u0026 Postgres\n\nShort Description: This sample shows you how to spin up a postgres database and a Jupyter notebook server.\n\nTags: Jupyter, Postgres, Database\n\nLanguages: Python, SQL\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdefanglabs%2Fjupyter-postgres-demo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdefanglabs%2Fjupyter-postgres-demo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdefanglabs%2Fjupyter-postgres-demo/lists"}