notes about server; switch to pgsql; update setup
parent
7fc713f30f
commit
b31026c896
|
@ -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
|
3
setup.py
3
setup.py
|
@ -16,6 +16,7 @@ setup(
|
||||||
],
|
],
|
||||||
packages=['ttadmin'],
|
packages=['ttadmin'],
|
||||||
install_requires = ['Django==1.10.2',
|
install_requires = ['Django==1.10.2',
|
||||||
'sshpubkeys==2.2.0',],
|
'sshpubkeys==2.2.0',
|
||||||
|
'psycopg2==2.6.2',],
|
||||||
include_package_data = True,
|
include_package_data = True,
|
||||||
)
|
)
|
||||||
|
|
|
@ -76,10 +76,15 @@ WSGI_APPLICATION = 'wsgi.application'
|
||||||
# Database
|
# Database
|
||||||
# https://docs.djangoproject.com/en/1.10/ref/settings/#databases
|
# https://docs.djangoproject.com/en/1.10/ref/settings/#databases
|
||||||
|
|
||||||
|
# TODO switch to postgres; use it locally and overwrite password live
|
||||||
DATABASES = {
|
DATABASES = {
|
||||||
'default': {
|
'default': {
|
||||||
'ENGINE': 'django.db.backends.sqlite3',
|
'ENGINE': 'django.db.backends.postgresql_psycopg2',
|
||||||
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
|
'NAME': 'ttadmin',
|
||||||
|
'USER': 'ttadmin',
|
||||||
|
'PASSWORD': 'ttadmin',
|
||||||
|
'HOST': 'localhost',
|
||||||
|
'PORT': '',
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue