Skip to content

Commit d3bc536

Browse files
authored
Merge pull request #4 from AITestingOrg/port-refactor
Updated names (due to docker changes) and made sure port did not rely…
2 parents 3c557ee + 8404ebf commit d3bc536

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
FROM openjdk:8-jdk-alpine
22
MAINTAINER Juan Sotomayor "jsoto128@fiu.edu"
33
VOLUME /tmp
4-
ADD build/libs/microservice--user-service-0.0.1-SNAPSHOT.jar app.jar
4+
ADD build/libs/user-service-0.0.1-SNAPSHOT.jar app.jar
55
ENV JAVA_OPTS=""
66
ENTRYPOINT [ "sh", "-c", "java $JAVA_OPTS -Djava.security.egd=file:/dev/./urandom -jar /app.jar" ]

docker-compose.yml

+6-6
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ services:
1010
environment:
1111
- 'eviction-interval-timer-in-ms: 1000'
1212

13-
mysql-server:
13+
mysqlserver:
1414
image: mysql:5.7
15-
container_name: mysql-server
15+
container_name: mysqlserver
1616
volumes:
1717
- mysql-data:/var/lib/mysql:rw
1818
restart: always
@@ -25,14 +25,14 @@ services:
2525
MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
2626
MYSQL_DATABASE: 'user_service'
2727

28-
microservice--user-service:
28+
userservice:
2929
build: ./
3030
depends_on:
3131
- discovery-service
32-
- mysql-server
33-
container_name: microservice--user-service
32+
- mysqlserver
33+
container_name: userservice
3434
ports:
35-
- '8091:8091'
35+
- '8080'
3636

3737
volumes:
3838
mysql-data:

src/main/resources/application.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ spring:
66
profiles: development
77

88
datasource:
9-
url: jdbc:mysql://mysql-server:3306/user_service
9+
url: jdbc:mysql://mysqlserver:3306/user_service
1010
username: root
1111
password: root
1212
driver-class-name: com.mysql.jdbc.Driver
@@ -28,14 +28,14 @@ eureka:
2828

2929
server:
3030
contextPath: /auth
31-
port: 8091
31+
port: ${APP_PORT:8080}
3232

3333
---
3434
spring:
3535
profiles: docker
3636

3737
datasource:
38-
url: jdbc:mysql://mysql-server:3306/user_service
38+
url: jdbc:mysql://mysqlserver:3306/user_service
3939
username: root
4040
password: root
4141
driver-class-name: com.mysql.jdbc.Driver
@@ -57,7 +57,7 @@ eureka:
5757

5858
server:
5959
contextPath: /auth
60-
port: 8091
60+
port: ${APP_PORT:8080}
6161

6262

6363
jpa:

src/main/resources/bootstrap.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
spring:
22
application:
3-
name: user-service
3+
name: userservice
44
profiles:
55
active: development
66
cloud:

0 commit comments

Comments
 (0)