Modified PG startup script and added volume

This commit is contained in:
Paul Trudel 2023-02-03 20:37:45 +00:00
parent 077fca3d7c
commit 62102a84a8
3 changed files with 2 additions and 4 deletions

View File

@ -11,4 +11,5 @@ services:
ports:
- "${HOST_PORT}:${CONTAINER_PORT}"
volumes:
- "./postgres-data:/var/lib/postgresql/data"
- "./src/main/java/db/migration:/docker-entrypoint-initdb.d"

View File

@ -8,7 +8,7 @@ echo '<!DOCTYPE hibernate-configuration PUBLIC
<session-factory>
<!-- JDBC Database connection settings -->
<property name="connection.driver_class">org.postgresql.Driver</property>
<property name="connection.url">jdbc:postgresql://localhost:'"$HOST_PORT"'/bbb</property>
<property name="connection.url">jdbc:postgresql://localhost:'"$HOST_PORT"'/'"$POSTGRES_USER"'</property>
<property name="connection.username">'"$POSTGRES_USER"'</property>
<property name="connection.password">'"$POSTGRES_PASSWORD"'</property>
<!-- JDBC connection pool settings -->

View File

@ -1,6 +1,3 @@
CREATE DATABASE bbb;
\c bbb;
CREATE TABLE IF NOT EXISTS recordings (
id BIGSERIAL PRIMARY KEY,
record_id VARCHAR(64),