-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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,4 @@ | ||
FROM openjdk:17 | ||
ARG JAR_FILE=./build/libs/caps-be-0.0.1-SNAPSHOT.jar | ||
COPY ${JAR_FILE} app.jar | ||
ENTRYPOINT ["java","-jar","/app.jar", "--spring.profiles.active=prod"] |
This file contains 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,29 @@ | ||
version: "3" # 버전 지정 | ||
|
||
services: # 컨테이너 설정 | ||
database: | ||
container_name: mysql # 컨테이너 이름 | ||
image: mysql/mysql-server:latest # 컨테이너에서 사용하는 base image 지정 | ||
environment: # 컨테이너 안의 환경변수 설정 | ||
MYSQL_DATABASE: caps-rds | ||
MYSQL_USER: admin | ||
MYSQL_PASSWORD: admin1234 | ||
MYSQL_ROOT_HOST: '%' | ||
MYSQL_ROOT_PASSWORD: rootpwd | ||
command: # 명령어 설정 | ||
- --default-authentication-plugin=mysql_native_password | ||
ports: # 접근 포트 설정 | ||
- 3305:3306 # Host:Container | ||
networks: | ||
- db_network | ||
restart: always # 컨테이너 실행 시 재시작 | ||
mytamla: | ||
build: . | ||
expose: | ||
- 8080 | ||
depends_on: | ||
- database | ||
|
||
networks: # 커스텀 네트워크 추가 | ||
db_network: # 네트워크 이름 | ||
driver: bridge |