Switch to postgres dev environment

This commit is contained in:
Reckless_Satoshi 2022-02-19 17:13:51 -08:00
parent 09565537c3
commit 2cf10ce86b
No known key found for this signature in database
GPG Key ID: 9C4585B561315571
4 changed files with 21 additions and 5 deletions

3
.gitignore vendored
View File

@ -641,6 +641,9 @@ FodyWeavers.xsd
# Celery
django
# Postgres
db
# robosats
frontend/static/assets/avatars*
api/lightning/lightning*

View File

@ -115,6 +115,16 @@ services:
- /mnt/development/tor/data:/var/lib/tor:ro
- /mnt/development/tor/config:/etc/tor:ro
- /mnt/development/bitcoin:/home/bitcoin/.bitcoin
postgres:
image: postgres:14.2-alpine
container_name: sql-dev
restart: always
environment:
POSTGRES_PASSWORD: example
network_mode: service:tor
volumes:
- ./db:/var/lib/postgresql/data
volumes:
redisdata:

View File

@ -21,3 +21,5 @@ ring==0.9.1
robohash==1.1
scipy==1.8.0
gunicorn==20.1.0
psycopg2==2.9.3
SQLAlchemy==1.4.31

View File

@ -97,11 +97,12 @@ WSGI_APPLICATION = "robosats.wsgi.application"
DATABASES = {
"default": {
"ENGINE": "django.db.backends.sqlite3",
"NAME": "/usr/src/database/db.sqlite3",
"OPTIONS": {
"timeout": 20, # in seconds
},
"ENGINE": "django.db.backends.postgresql",
"NAME": "postgres",
"USER": "postgres",
"PASSWORD": "example",
'HOST': '127.0.0.1',
"PORT": "5432",
}
}