Skip to content

Updated names (due to docker changes) and made sure port did not rely… #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 11, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
FROM openjdk:8-jdk-alpine
MAINTAINER Juan Sotomayor "jsoto128@fiu.edu"
VOLUME /tmp
ADD build/libs/microservice--user-service-0.0.1-SNAPSHOT.jar app.jar
ADD build/libs/user-service-0.0.1-SNAPSHOT.jar app.jar
ENV JAVA_OPTS=""
ENTRYPOINT [ "sh", "-c", "java $JAVA_OPTS -Djava.security.egd=file:/dev/./urandom -jar /app.jar" ]
12 changes: 6 additions & 6 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ services:
environment:
- 'eviction-interval-timer-in-ms: 1000'

mysql-server:
mysqlserver:
image: mysql:5.7
container_name: mysql-server
container_name: mysqlserver
volumes:
- mysql-data:/var/lib/mysql:rw
restart: always
Expand All @@ -25,14 +25,14 @@ services:
MYSQL_ALLOW_EMPTY_PASSWORD: 'yes'
MYSQL_DATABASE: 'user_service'

microservice--user-service:
userservice:
build: ./
depends_on:
- discovery-service
- mysql-server
container_name: microservice--user-service
- mysqlserver
container_name: userservice
ports:
- '8091:8091'
- '8080'

volumes:
mysql-data:
Expand Down
8 changes: 4 additions & 4 deletions src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ spring:
profiles: development

datasource:
url: jdbc:mysql://mysql-server:3306/user_service
url: jdbc:mysql://mysqlserver:3306/user_service
username: root
password: root
driver-class-name: com.mysql.jdbc.Driver
Expand All @@ -28,14 +28,14 @@ eureka:

server:
contextPath: /auth
port: 8091
port: ${APP_PORT:8080}

---
spring:
profiles: docker

datasource:
url: jdbc:mysql://mysql-server:3306/user_service
url: jdbc:mysql://mysqlserver:3306/user_service
username: root
password: root
driver-class-name: com.mysql.jdbc.Driver
Expand All @@ -57,7 +57,7 @@ eureka:

server:
contextPath: /auth
port: 8091
port: ${APP_PORT:8080}


jpa:
Expand Down
2 changes: 1 addition & 1 deletion src/main/resources/bootstrap.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
spring:
application:
name: user-service
name: userservice
profiles:
active: development
cloud:
Expand Down