notes about server; switch to pgsql; update setup

pull/1/head
nathaniel smith 2016-12-14 00:30:47 -08:00
parent 7fc713f30f
commit b31026c896
3 changed files with 32 additions and 3 deletions

23
serversetup.md 100644
View File

@ -0,0 +1,23 @@
# server setup for ttadmin
## stuff to install
* autoconf?
* python3-dev
* postgresql-server-dev-9.5
* python 3.4+
* postgresql
* virtualenv
* nginx
## steps
* create ttadmin user
* ttadmin db user (or just rely on ident..?) / database created
* add to sudoers:
ttadmin ALL=(ALL)NOPASSWD:/usr/sbin/adduser,/usr/sbin/deluser,/usr/sbin/delgroup
* have virtualenv with python 3.5+ ready, install tildetown-admin package into it
* run django app as wsgi container through gunicorn as the ttadmin user with venv active
* nginx proxy pass at /ttadmin

View File

@ -16,6 +16,7 @@ setup(
],
packages=['ttadmin'],
install_requires = ['Django==1.10.2',
'sshpubkeys==2.2.0',],
'sshpubkeys==2.2.0',
'psycopg2==2.6.2',],
include_package_data = True,
)

View File

@ -76,10 +76,15 @@ WSGI_APPLICATION = 'wsgi.application'
# Database
# https://docs.djangoproject.com/en/1.10/ref/settings/#databases
# TODO switch to postgres; use it locally and overwrite password live
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': 'ttadmin',
'USER': 'ttadmin',
'PASSWORD': 'ttadmin',
'HOST': 'localhost',
'PORT': '',
}
}