This repository has been archived on 2023-02-07. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
blender-my-data/docker/create_db.sh

21 lines
498 B
Bash
Executable File

#!/bin/sh -ex
# This should only be run once, to create the database + users.
chown postgres:postgres /var/lib/postgresql
su postgres -c '/usr/lib/postgresql/10/bin/initdb'
echo "Starting postgresql"
pg_ctlcluster 10 main start
echo
echo "Creating 'mydata' user"
su postgres -c 'createuser mydata -dPERS'
echo
echo "Creating 'opendata' user"
su postgres -c 'createuser opendata -dPERS'
su postgres -c 'createdb -E UTF8 -O mydata mydata'
su postgres -c 'createdb -E UTF8 -O opendata opendata'