Commit 4a9dc0b4245817e8aea2a5eb745bab88d4228c05
1 parent
201450f1
add module.xml and chahange standalone.xml and dockerfile
Showing
3 changed files
with
50 additions
and
1 deletions
docker/wildfly/Dockerfile
1 | 1 | FROM jboss/wildfly:10.1.0.Final |
2 | 2 | RUN /opt/jboss/wildfly/bin/add-user.sh admin Admin |
3 | -COPY standalone.xml /opt/jboss/wildfly/standalone/configuration/standalone.xml | |
4 | 3 | \ No newline at end of file |
4 | +COPY standalone.xml /opt/jboss/wildfly/standalone/configuration/standalone.xml | |
5 | + | |
6 | +#USER root | |
7 | + | |
8 | +ADD modules/postgresql-42.1.4.jar /opt/jboss/wildfly/modules/org/postgres/main/postgresql-42.1.4.jar | |
9 | +ADD modules/module.xml /opt/jboss/wildfly/modules/org/postgres/main/module.xml | |
10 | + | |
11 | +#ADD modules/postgresql-42.1.4.jar /opt/jboss/wildfly/modules/system/layers/base/org/postgres/main/postgresql-42.1.4.jar | |
12 | +#ADD modules/module.xml /opt/jboss/wildfly/modules/system/layers/base/org/postgres/main/module.xml | |
13 | + | |
14 | +#RUN /subsystem=datasources/jdbc-driver=org.postgresql:add(driver-name=postgresql, driver-module-name=postgresql, driver-xa-datasource-class-name=org.postgresql.xa.PGXADataSource) | |
15 | +#RUN /subsystem=datasources/xa-data-source=postgresql:add(driver-name=postgresql, jndi-name="java:jboss/datasources/PostgreSQLDS", enabled=true) | |
16 | +#RUN /subsystem=datasources/xa-data-source=postgresql/xa-datasource-properties=URL:add(value="jdbc:postgresql://localhost:5432/beuthbot") | ... | ... |
docker/wildfly/modules/module.xml
0 → 100644
1 | +<?xml version="1.0" encoding="UTF-8"?> | |
2 | +<module xmlns="urn:jboss:module:1.0" name="postgresql"> | |
3 | + <resources> | |
4 | + <!--https://jdbc.postgresql.org/download.html--> | |
5 | + <resource-root path="postgresql-9.3-1104.jdbc41.jar"/> | |
6 | + </resources> | |
7 | + <dependencies> | |
8 | + <module name="javax.api"/> | |
9 | + <module name="javax.transaction.api"/> | |
10 | + </dependencies> | |
11 | +</module> | |
0 | 12 | \ No newline at end of file | ... | ... |
docker/wildfly/standalone.xml
... | ... | @@ -417,6 +417,32 @@ |
417 | 417 | <client-config name="Standard-Client-Config"/> |
418 | 418 | </subsystem> |
419 | 419 | <subsystem xmlns="urn:jboss:domain:weld:3.0"/> |
420 | + | |
421 | + <subsystem xmlns="urn:jboss:domain:datasources:2.0"> | |
422 | + <datasources> | |
423 | + <datasource jta="true" jndi-name="java:jboss/datasources/PostgreSQLDS" pool-name="postgresql" enabled="true" use-java-context="true"> | |
424 | + <connection-url>jdbc:postgresql://localhost:5432/beuthbot</connection-url> | |
425 | + <connection-property name="databaseName">beuthbot</connection-property> | |
426 | + <driver>postgresql</driver> | |
427 | + <security> | |
428 | + <user-name>beuthbot_app</user-name> | |
429 | + <password>VhS7WPVpdYEHYLpf</password> | |
430 | + </security> | |
431 | + <validation> | |
432 | + <valid-connection-checker class-name="org.jboss.jca.adapters.jdbc.extensions.postgres.PostgreSQLValidConnectionChecker"/> | |
433 | + <exception-sorter class-name="org.jboss.jca.adapters.jdbc.extensions.postgres.PostgreSQLExceptionSorter"/> | |
434 | + </validation> | |
435 | + </datasource> | |
436 | + <drivers> | |
437 | + <driver name="postgresql" module="postgresql"> | |
438 | + <driver-class>org.postgresql.Driver</driver-class> | |
439 | + <xa-datasource-class>org.postgresql.xa.PGXADataSource</xa-datasource-class> | |
440 | + <datasource-class>org.postgresql.ds.PGSimpleDataSource</datasource-class> | |
441 | + </driver> | |
442 | + </drivers> | |
443 | + </datasources> | |
444 | + </subsystem> | |
445 | + | |
420 | 446 | </profile> |
421 | 447 | |
422 | 448 | <interfaces> | ... | ... |