diff --git a/arlas-persistence-core/src/main/java/io/arlas/persistence/server/model/Data.java b/arlas-persistence-core/src/main/java/io/arlas/persistence/server/model/Data.java index 4549d21..7bd405d 100644 --- a/arlas-persistence-core/src/main/java/io/arlas/persistence/server/model/Data.java +++ b/arlas-persistence-core/src/main/java/io/arlas/persistence/server/model/Data.java @@ -34,7 +34,7 @@ @Entity -@Table(name = "user_data") +@Table(name = "user_data", indexes={@Index(columnList="docKey,docZone,docOrganization",name="doc_key_idx_orga")}) @JsonSnakeCase public class Data { public static final String idColumn = "id"; diff --git a/docker/docker-files/Dockerfile b/docker/docker-files/Dockerfile index b61cc64..b69627d 100644 --- a/docker/docker-files/Dockerfile +++ b/docker/docker-files/Dockerfile @@ -23,7 +23,6 @@ FROM gisaia/arlas-openjdk-17-distroless:20240926175122 WORKDIR /opt/app COPY --from=build /opt/build/arlas-persistence-server.jar /opt/app/ COPY --from=build /opt/build/conf/configuration.yaml /opt/app/ -COPY --from=build /opt/build/docker/docker-files/pgCreateTable.sql /opt/app/ EXPOSE 9997 ENV JDK_JAVA_OPTIONS="-Xmx512m -XX:+ExitOnOutOfMemoryError" diff --git a/docker/docker-files/Dockerfile-package-only b/docker/docker-files/Dockerfile-package-only index d6926e1..6fed6b2 100644 --- a/docker/docker-files/Dockerfile-package-only +++ b/docker/docker-files/Dockerfile-package-only @@ -7,7 +7,6 @@ FROM gisaia/arlas-openjdk-17-distroless:20240926175122 WORKDIR /opt/app ADD arlas-persistence-server/target/arlas-persistence-server*.jar /opt/app/arlas-persistence-server.jar ADD conf/configuration.yaml /opt/app/configuration.yaml -ADD docker/docker-files/pgCreateTable.sql /opt/app/pgCreateTable.sql EXPOSE 9997 ENV JDK_JAVA_OPTIONS="-Xmx512m -XX:+ExitOnOutOfMemoryError" diff --git a/docs/arlas-persistence-overview.md b/docs/arlas-persistence-overview.md index 9e34a65..ce50e91 100644 --- a/docs/arlas-persistence-overview.md +++ b/docs/arlas-persistence-overview.md @@ -5,7 +5,7 @@ Three types of storage are available in this server: - File system storage - All SQL SGBD compliant with hibernate, we use a non configurable unique table [`user_data`](../docker/docker-files/pgCreateTable.sql) in a dedicated configurable database. - ARLAS Persistence WILL NOT CREATE the table for you, think to create table before running the server. + ARLAS Persistence WILL CREATE the database and tables for you. **WARNING** if you want to use this storage, make sure you have the environment variable ``ARLAS_PERSISTENCE_ENGINE`` set to **"hibernate"** with the double quote. - Google Cloud Firestore : think to set GOOGLE_APPLICATION_CREDENTIALS as environement variable.