Skip to content

Instantly share code, notes, and snippets.

@manics
Last active September 22, 2023 23:19
Show Gist options
  • Save manics/e1392b4368cff1b92c362f121215ce84 to your computer and use it in GitHub Desktop.
Save manics/e1392b4368cff1b92c362f121215ce84 to your computer and use it in GitHub Desktop.
Example mybinder postgresql server

mybinder/repo2docker PostgreSQL server

Binder

Example mybinder repo with a built-in PostgreSQL server.

name: root
channels:
- defaults
dependencies:
- postgresql
- psycopg2
Display the source blob
Display the rendered blob
Raw
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#!/bin/bash
set -eux
PGDATA=${PGDATA:-/home/jovyan/srv/pgsql}
if [ ! -d "$PGDATA" ]; then
initdb -D "$PGDATA" --auth-host=md5 --encoding=UTF8
fi
#!/bin/bash
set -eux
PGDATA=${PGDATA:-/home/jovyan/srv/pgsql}
pg_ctl -D "$PGDATA" -l "$PGDATA/pg.log" start
exec "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment