markdown fix

This commit is contained in:
Dan Ballard 2015-12-25 20:10:59 -08:00
parent e45be9fbd3
commit 62366427fb
1 changed files with 26 additions and 28 deletions

View File

@ -20,55 +20,53 @@ sudo apt-get install postgres postgresql-contrib
Setup postgres to handle a local connection for transmet in pg_hba.conf Setup postgres to handle a local connection for transmet in pg_hba.conf
either: either:
'''host transmet transmet 127.0.0.1/32 md5''' host transmet transmet 127.0.0.1/32 md5
or a more liberal: or a more liberal:
'''host all all 127.0.0.1/32 md5 ''' host all all 127.0.0.1/32 md5
and do the same for and do the same for
'''host all all ::1/128 md5''' host all all ::1/128 md5
ipv6 ipv6
create ssl certs and put them somewhere create ssl certs and put them somewhere
enable SSL in postgresql.conf enable SSL in postgresql.conf
'''
ssl = true ssl = true
ssl_cert_file = 'WHER_YOU_PUT/server.crt' ssl_cert_file = 'WHER_YOU_PUT/server.crt'
ssl_key_file = 'WHERE_YOU_PUT/server.key' ssl_key_file = 'WHERE_YOU_PUT/server.key'
'''
Create postgress DB and user Create postgress DB and user
'''sh sh
sudo -u postgres --or-- sudo su - postgres sudo -u postgres --or-- sudo su - postgres
createuser -S -P -E transmet createuser -S -P -E transmet
createdb --owner transmet --encoding utf8 transmet createdb --owner transmet --encoding utf8 transmet
psql psql
\c transmet \c transmet
CREATE EXTENSION pgcrypto; CREATE EXTENSION pgcrypto;
'''
put DB details in
db/dbconf.yml (copied from db/dbconf.EXAMPLE)
config/prod.json (copied from config/local.json)
go get bitbucket.org/liamstask/goose/cmd/goose put DB details in:
* db/dbconf.yml (copied from db/dbconf.EXAMPLE)
* config/prod.json (copied from config/local.json)
goose up go get bitbucket.org/liamstask/goose/cmd/goose
goose up
## Run ## Run
Assumed GOPATH=/opt/go Assumed `GOPATH=/opt/go`
edit transmet.conf to point to correct location edit transmet.conf to point to correct location
sudo cp transmet.conf /etc/init sudo cp transmet.conf /etc/init
./gen-csrf.sh
./gen-csrf.sh sudo service transmet start
sudo service transmet start
## Setup environment ## Setup environment
### Adding a user ### Adding a user
INSERT INTO users (username, password) VALUES('USERNAME', crypt('PASSWORD', gen_salt('bf'))); INSERT INTO users (username, password) VALUES('USERNAME', crypt('PASSWORD', gen_salt('bf')));