Skip to content

Commit

Permalink
change database container port
Browse files Browse the repository at this point in the history
  • Loading branch information
mixaverros88 committed May 12, 2020
1 parent e2f1267 commit db2fd1e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ RUN echo "=> Starting WildFly server" && \
--user-name=${DB_USER} \
--password=${DB_PASS} \
--driver-name=mysql \
--connection-url=jdbc:mysql://${DB_URI}:3306/${DB_NAME}?useLegacyDatetimeCode=false&serverTimezone=UTC&characterEncoding=latin1 \
--connection-url=jdbc:mysql://${DB_URI}:3311/${DB_NAME}?useLegacyDatetimeCode=false&serverTimezone=UTC&characterEncoding=latin1 \
--use-ccm=false \
--max-pool-size=25 \
--blocking-timeout-wait-millis=5000 \
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ services:
enviroment:
- MYSQL_ROOT_PASSWORD=kdiosk33
ports:
- 3306:3306
- 3311:3306
networks:
- isolated
javaecommerce:
Expand Down
2 changes: 1 addition & 1 deletion run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ docker network create --driver bridge my_isolated_bridge_network
docker build -t mixaverross88/java-e-commerce-mysql:1.1 -f Dockerfile.Mysql .

# Run Mysql Image
docker run -d -p 3306:3306 --name mysqlapp \
docker run -d -p 3311:3306 --name mysqlapp \
--network=my_isolated_bridge_network \
-e MYSQL_ROOT_PASSWORD='kdiosk33' mixaverross88/java-e-commerce-mysql:1.1

Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/META-INF/persistence.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<!-- Once your are using a datasource, is not required to configure properties below -->
<properties>
<property name="javax.persistence.jdbc.driver" value="com.mysql.cj.jdbc.Driver" />
<property name="javax.persistence.jdbc.url" value="jdbc:mysql://mysqlapp:3306/poll?useSSL=false" />
<property name="javax.persistence.jdbc.url" value="jdbc:mysql://mysqlapp:3311/poll?useSSL=false" />
<!--without docker-->
<!--<property name="javax.persistence.jdbc.url" value="jdbc:mysql://localhost:3306/poll?useSSL=false" />-->
<property name="javax.persistence.jdbc.user" value="root" />
Expand Down

0 comments on commit db2fd1e

Please sign in to comment.