Switch to postgres dev environment

This commit is contained in:
Reckless_Satoshi
2022-02-19 17:13:51 -08:00
parent 09565537c3
commit 2cf10ce86b
4 changed files with 21 additions and 5 deletions

3
.gitignore vendored
View File

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

View File

@ -116,5 +116,15 @@ services:
- /mnt/development/tor/config:/etc/tor:ro - /mnt/development/tor/config:/etc/tor:ro
- /mnt/development/bitcoin:/home/bitcoin/.bitcoin - /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: volumes:
redisdata: redisdata:

View File

@ -21,3 +21,5 @@ ring==0.9.1
robohash==1.1 robohash==1.1
scipy==1.8.0 scipy==1.8.0
gunicorn==20.1.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 = { DATABASES = {
"default": { "default": {
"ENGINE": "django.db.backends.sqlite3", "ENGINE": "django.db.backends.postgresql",
"NAME": "/usr/src/database/db.sqlite3", "NAME": "postgres",
"OPTIONS": { "USER": "postgres",
"timeout": 20, # in seconds "PASSWORD": "example",
}, 'HOST': '127.0.0.1',
"PORT": "5432",
} }
} }