summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Dockerfile2
-rw-r--r--opendc-integration-jpa/src/main/kotlin/nl/atlarge/opendc/platform/JpaPlatformRunner.kt2
-rw-r--r--opendc-integration-jpa/src/main/resources/META-INF/persistence.xml2
3 files changed, 3 insertions, 3 deletions
diff --git a/Dockerfile b/Dockerfile
index 3bc786ee..6346a940 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -13,4 +13,4 @@ USER gradle
WORKDIR /simulator/opendc-integration-jpa
# Run the application
-CMD ["/bin/sh", "-c", "gradle run -Ppersistence.url=$PERSISTENCE_URL -Ppersistence.user=$PERSISTENCE_USER -Ppersistence.password=$PERSISTENCE_PASSWORD"]
+CMD ["/bin/sh", "-c", "gradle run -Ppersistence.url=$(echo \"jdbc:mysql://mariadb:3306/\"$MYSQL_DATABASE) -Ppersistence.user=$MYSQL_USER -Ppersistence.password=$MYSQL_PASSWORD"]
diff --git a/opendc-integration-jpa/src/main/kotlin/nl/atlarge/opendc/platform/JpaPlatformRunner.kt b/opendc-integration-jpa/src/main/kotlin/nl/atlarge/opendc/platform/JpaPlatformRunner.kt
index 10e80260..d7282c27 100644
--- a/opendc-integration-jpa/src/main/kotlin/nl/atlarge/opendc/platform/JpaPlatformRunner.kt
+++ b/opendc-integration-jpa/src/main/kotlin/nl/atlarge/opendc/platform/JpaPlatformRunner.kt
@@ -40,7 +40,7 @@ val logger = KotlinLogging.logger {}
fun main(args: Array<String>) {
val threads = 1
val executorService = Executors.newFixedThreadPool(threads)
- val factory = Persistence.createEntityManagerFactory("opendc-frontend")
+ val factory = Persistence.createEntityManagerFactory("opendc-simulator")
val experiments = JpaExperimentManager(factory)
logger.info { "Waiting for enqueued experiments..." }
diff --git a/opendc-integration-jpa/src/main/resources/META-INF/persistence.xml b/opendc-integration-jpa/src/main/resources/META-INF/persistence.xml
index 5b01b38e..311772f4 100644
--- a/opendc-integration-jpa/src/main/resources/META-INF/persistence.xml
+++ b/opendc-integration-jpa/src/main/resources/META-INF/persistence.xml
@@ -27,7 +27,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd"
version="2.0">
- <persistence-unit name="opendc-frontend">
+ <persistence-unit name="opendc-simulator">
<provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>
<mapping-file>jpa/schema.xml</mapping-file>
<properties>