Spaces:
Sleeping
Sleeping
Download app/templates/postgresql_setup.j2 from shakauthossain/deploymate: direct link, hf CLI and curl.
- Browser
- Download file 301 Bytes
-
https://huggingface.co/spaces/shakauthossain/deploymate/resolve/main/app/templates/postgresql_setup.j2
- Command line
-
hf download hf://spaces/shakauthossain/deploymate/app/templates/postgresql_setup.j2
-
curl -L -o postgresql_setup.j2 https://huggingface.co/spaces/shakauthossain/deploymate/resolve/main/app/templates/postgresql_setup.j2
301 Bytes
| #!/bin/bash | |
| # PostgreSQL setup script | |
| sudo apt-get update | |
| sudo apt-get install -y postgresql postgresql-contrib | |
| # Create database and user | |
| sudo -u postgres psql <<EOF | |
| CREATE DATABASE mydb; | |
| CREATE USER myuser WITH ENCRYPTED PASSWORD 'mypassword'; | |
| GRANT ALL PRIVILEGES ON DATABASE mydb TO myuser; | |
| EOF | |