From 097a80e8de44ec81171841fba4987e9dbff933b8 Mon Sep 17 00:00:00 2001 From: Blair Vanderlugt Date: Mon, 15 Mar 2021 13:20:18 +0000 Subject: [PATCH] cic cache db fixes --- apps/cic-cache/.config/database.ini | 2 +- apps/cic-cache/cic_cache/db/migrations/default/alembic.ini | 2 +- apps/cic-cache/db/initdb_files/create_all_db.sql | 5 ----- docker-compose.yml | 1 + 4 files changed, 3 insertions(+), 7 deletions(-) delete mode 100644 apps/cic-cache/db/initdb_files/create_all_db.sql diff --git a/apps/cic-cache/.config/database.ini b/apps/cic-cache/.config/database.ini index b8c77685..72175b93 100644 --- a/apps/cic-cache/.config/database.ini +++ b/apps/cic-cache/.config/database.ini @@ -1,5 +1,5 @@ [database] -NAME=cic-eth +NAME=cic_cache USER=postgres PASSWORD= HOST=localhost diff --git a/apps/cic-cache/cic_cache/db/migrations/default/alembic.ini b/apps/cic-cache/cic_cache/db/migrations/default/alembic.ini index 352cf337..d05f4541 100644 --- a/apps/cic-cache/cic_cache/db/migrations/default/alembic.ini +++ b/apps/cic-cache/cic_cache/db/migrations/default/alembic.ini @@ -36,7 +36,7 @@ script_location = . # output_encoding = utf-8 #sqlalchemy.url = driver://user:pass@localhost/dbname -sqlalchemy.url = postgresql+psycopg2://postgres@localhost:5432/cic-cache +sqlalchemy.url = postgresql+psycopg2://postgres@localhost:5432/cic_cache [post_write_hooks] diff --git a/apps/cic-cache/db/initdb_files/create_all_db.sql b/apps/cic-cache/db/initdb_files/create_all_db.sql deleted file mode 100644 index 1282d8b8..00000000 --- a/apps/cic-cache/db/initdb_files/create_all_db.sql +++ /dev/null @@ -1,5 +0,0 @@ -CREATE DATABASE "cic-cache"; -CREATE DATABASE "cic-eth"; -CREATE DATABASE "cic-notify"; -CREATE DATABASE "cic-meta"; -CREATE DATABASE "cic-signer"; \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 7bd962bf..ad78f0b5 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -54,6 +54,7 @@ services: volumes: - ./scripts/initdb/create_db.sql:/docker-entrypoint-initdb.d/1-create_all_db.sql - ./apps/cic-meta/scripts/initdb/postgresql.sh:/docker-entrypoint-initdb.d/2-init-cic-meta.sh + - ./apps/cic-cache/db/psycopg2/db.sql:/docker-entrypoint-initdb.d/3-init-cic-meta.sql - postgres-db:/var/lib/postgresql/data redis: