michael / hub

Substance Hub
6 stars 0 forks source link

Postgres Initialization #60

Open michael opened 11 years ago

michael commented 11 years ago

Just saw the newly created postgres.init file.

-- Adapt this file to your need and execute with
--     psql postgres -p 5432 -h localhost -f postgres.init
--
-- Put this into your ~/.profile:
-- export SUBSTANCE_PRODUCTION_POSTGRES_CONN="postgres://substance:<PASSWORD>@localhost:5432/substance"
-- export SUBSTANCE_DEVELOPMENT_POSTGRES_CONN="postgres://substance:<PASSWORD>@localhost:5432/substance_development"
-- export SUBSTANCE_TEST_POSTGRES_CONN="postgres://substance:<PASSWORD>@localhost:5432/substance_test"
--
--

create user substance with password '<PASSWORD-HERE>';
create database substance with owner = substance;
create database substance_development with owner = substance;
create database substance_test with owner = substance;
grant all privileges on database substance to substance;
grant all privileges on database substance_test to substance;
grant all privileges on database substance_development to substance;

I wonder if we should just set the password to 'substance' for faster setup? Or is there a way to parametrize the script somehow?

michael commented 11 years ago

Maybe we should do the same for Redis? E.g. having multiple redis instances on different ports? Or is it just fine to use the ENV as the main scope?

obuchtala commented 11 years ago

I wonder if we should just set the password to 'substance' for faster setup?

Agreed.