copilar codigo con ant y deployar ultima version

This commit is contained in:
Gabriel Paradiso
2019-12-20 00:35:35 +01:00
parent 904976f2cb
commit d179280321
9 changed files with 30 additions and 25 deletions

View File

@@ -1,24 +0,0 @@
FROM jboss/wildfly:14.0.1.Final
# User root user to install software
USER root
RUN yum -y install expect
RUN yum -y install postgresql
# Switch back to jboss user
USER jboss
ADD createApplicationUser.sh /opt/jboss/wildfly/bin/
ADD createManagementUser.sh /opt/jboss/wildfly/bin/
RUN cd /opt/jboss/wildfly/bin && ./createApplicationUser.sh
RUN cd /opt/jboss/wildfly/bin && ./createManagementUser.sh
ADD MyHealth.ear /opt/jboss/wildfly/standalone/deployments/
RUN mkdir /opt/jboss/wildfly/modules/system/layers/base/org/postgresql/
RUN mkdir /opt/jboss/wildfly/modules/system/layers/base/org/postgresql/main
ADD postgresql-9.4.1209.jar /opt/jboss/wildfly/modules/system/layers/base/org/postgresql/main
ADD module.xml /opt/jboss/wildfly/modules/system/layers/base/org/postgresql/main
ADD standalone.xml /opt/jboss/wildfly/standalone/configuration/standalone.xml
CMD ["/opt/jboss/wildfly/bin/standalone.sh", "-b", "0.0.0.0", "-bmanagement", "0.0.0.0"]

Binary file not shown.

29
Dockerfile Normal file
View File

@@ -0,0 +1,29 @@
FROM jboss/wildfly:14.0.1.Final
# User root user to install software
USER root
RUN yum -y install expect
RUN yum -y install postgresql
RUN yum -y install ant
# Compile and copy .ear to deployments
ADD ./1.sources/ /opt/jboss/
RUN cd /opt/jboss/MyHealth && ant
RUN mv /opt/jboss/MyHealth/dist/MyHealth.ear /opt/jboss/wildfly/standalone/deployments
# Switch back to jboss user
USER jboss
ADD ./4.config/createApplicationUser.sh /opt/jboss/wildfly/bin/
ADD ./4.config/createManagementUser.sh /opt/jboss/wildfly/bin/
RUN cd /opt/jboss/wildfly/bin && ./createApplicationUser.sh
RUN cd /opt/jboss/wildfly/bin && ./createManagementUser.sh
RUN mkdir /opt/jboss/wildfly/modules/system/layers/base/org/postgresql/
RUN mkdir /opt/jboss/wildfly/modules/system/layers/base/org/postgresql/main
ADD ./4.config/postgresql-9.4.1209.jar /opt/jboss/wildfly/modules/system/layers/base/org/postgresql/main
ADD ./4.config/module.xml /opt/jboss/wildfly/modules/system/layers/base/org/postgresql/main
ADD ./4.config/standalone.xml /opt/jboss/wildfly/standalone/configuration/standalone.xml
CMD ["/opt/jboss/wildfly/bin/standalone.sh", "-b", "0.0.0.0", "-bmanagement", "0.0.0.0"]

View File

@@ -9,7 +9,7 @@ services:
- POSTGRES_PASSWORD=PASSWORD - POSTGRES_PASSWORD=PASSWORD
- POSTGRES_DB=myhealth - POSTGRES_DB=myhealth
volumes: volumes:
- ../2.database/01.CreateTables.sql:/docker-entrypoint-initdb.d/init.sql - ./2.database/01.CreateTables.sql:/docker-entrypoint-initdb.d/init.sql
wildfly: wildfly:
build: . build: .
ports: ports: