-
Notifications
You must be signed in to change notification settings - Fork 3
chore: 에뮬레이터 각기 다른 gpx 파일로 컨테이너 만들기 #333
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
The head ref may contain hidden characters: "chore/#305-\uC5D0\uBBAC\uB808\uC774\uD130-\uAC01\uAE30-\uB2E4\uB978-gpx-\uD30C\uC77C\uB85C-\uCEE8\uD14C\uC774\uB108-\uB9CC\uB4E4\uAE30"
Merged
Changes from 6 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
f565c7c
chore: 에뮬레이터 컨테이너 3개 띄우기
tomatozil cdc4cf7
Merge branch 'develop' into chore/#305-에뮬레이터-각기-다른-gpx-파일로-컨테이너-만들기
tomatozil 83adf3d
feat: profile마다 차량 고정값 다르게 쓰기
tomatozil 41786a3
fix: 주석 달기, 클래스 이름 수정이 전파된 파일들, 테스트 파일 삭제
tomatozil 76eee62
commit: chore: init-data.sql 찌끔 수정
tomatozil af3b841
Merge branch 'develop' into chore/#305-에뮬레이터-각기-다른-gpx-파일로-컨테이너-만들기
tomatozil 413955f
fix: applicationcontext까지 사용하는 것은 불필요하다고 판단
tomatozil File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| FROM openjdk:21-jdk-slim | ||
| ARG JAR_FILE=../build/libs/*.jar | ||
| COPY ${JAR_FILE} /app/app.jar | ||
| WORKDIR /app | ||
| ENTRYPOINT ["java", "-jar", "app.jar"] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,30 @@ | ||
| services: | ||
| container1: | ||
| container_name: tomato | ||
| build: | ||
| context: ../ | ||
| dockerfile: simulation/Dockerfile | ||
| ports: | ||
| - "8091:8091" | ||
| environment: | ||
| - SPRING_PROFILES_ACTIVE=tomato | ||
|
|
||
| container2: | ||
| container_name: banana | ||
| build: | ||
| context: ../ | ||
| dockerfile: simulation/Dockerfile | ||
| ports: | ||
| - "8092:8092" | ||
| environment: | ||
| - SPRING_PROFILES_ACTIVE=banana | ||
|
|
||
| container3: | ||
| container_name: apple | ||
| build: | ||
| context: ../ | ||
| dockerfile: simulation/Dockerfile | ||
| ports: | ||
| - "8093:8093" | ||
| environment: | ||
| - SPRING_PROFILES_ACTIVE=apple |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| #!/bin/bash | ||
|
|
||
| set -e | ||
|
|
||
| echo "🛠️ Gradle 프로젝트 빌드 중..." | ||
| ../../gradlew :monicar-emulator:build --project-dir ../.. -x test | ||
|
|
||
| # .yml 확인하여 원하는 profile 이름으로 -f 뒤 값 수정 예) tomato -> banana | ||
| docker rm -f tomato 2>/dev/null || true | ||
|
|
||
| # 선택한 profile로 -t 뒤 값 수정 예) tomato-image -> banana-image | ||
| docker build -t tomato-image -f Dockerfile ../ | ||
|
|
||
| # 선택한 profile로 --name 뒤 값과 마지막 xx-image 값 수정하기 | ||
| docker run -d --name tomato \ | ||
| -p 8091:8091 \ | ||
| -e SPRING_PROFILES_ACTIVE=tomato \ | ||
| tomato-image |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,9 @@ | ||
| #!/bin/bash | ||
|
|
||
| set -e | ||
|
|
||
| echo "🛠️ Gradle 프로젝트 빌드 중..." | ||
| ../../gradlew :monicar-emulator:build --project-dir ../.. | ||
|
|
||
| echo "🐳 Docker Compose 빌드 및 컨테이너 실행..." | ||
| docker compose up --build |
20 changes: 20 additions & 0 deletions
20
monicar-emulator/src/main/java/org/emulator/config/ApplicationContextProvider.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| package org.emulator.config; | ||
|
|
||
| import org.springframework.beans.BeansException; | ||
| import org.springframework.context.ApplicationContext; | ||
| import org.springframework.context.ApplicationContextAware; | ||
| import org.springframework.stereotype.Component; | ||
|
|
||
| @Component | ||
| public class ApplicationContextProvider implements ApplicationContextAware { | ||
| private static ApplicationContext context; | ||
|
|
||
| @Override | ||
| public void setApplicationContext(ApplicationContext applicationContext) throws BeansException { | ||
| context = applicationContext; | ||
| } | ||
|
|
||
| public static ApplicationContext getApplicationContext() { | ||
| return context; | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
monicar-emulator/src/main/java/org/emulator/device/VehicleInfoDynamic.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| package org.emulator.device; | ||
|
|
||
| import org.springframework.beans.factory.annotation.Value; | ||
| import org.springframework.stereotype.Component; | ||
|
|
||
| @Component | ||
| public record VehicleInfoDynamic( | ||
| @Value("${fixed.vehicle-mdn}") | ||
| long vehicleMdn, | ||
| @Value("${fixed.vehicle-number}") | ||
| String vehicleNumber | ||
| ) {} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.