Container 6

GraalVM 으로 SpringBoot 시작 시간 줄이기 (맛보기)

TL;DRGraalVM(지랄VM)은 Java 어플리케이션을 미리 컴파일하여 바로 시작될 수 있게 합니다. 시작 시 워밍업이 필요하지 않으며, 더 적은 리소스를 사용합니다. 대신 빌드가 느립니다. 자세한 정보는 https://www.graalvm.org/latest/docs/getting-started/ 시작시간 비교하기Spring Batch를 사용하였습니다. (아주 간단한 Job을 실행하였습니다.) 2.474s -> 0.114s 예시 코드 https://github.com/GHGHGHKO/migration-v3-with-graal migration-v3-with-graal/src/main at main · GHGHGHKO/migration-v3-with-graalMigrating from Spring B..

SpringBoot 2024.03.27

jib 배포, 코드 배포, 코드 컨테이너, 앱 컨테이너 만들기

https://alden-kang.tistory.com/1 jib를 이용한 자바 앱 컨테이너화 오늘은 구글 클라우드 도구 중 하나인 jib를 이용한 자바 애플리케이션 컨테이너화 과정에 대해 살펴보려고 합니다. jib가 무엇인지 궁금하신 분들을 위해 간단한 설명과 예제 애플리케이션을 alden-kang.tistory.com 해당 출처를 기반으로 만들었습니다. 본 블로그에서는 java 11을 활용했습니다. jib은 해당 명령어를 실행하면 설정되어 있는 컨테이너 장소에 이미지를 push 하는 명령어이다. 자세한 내용은 출처에 있다. 바로 시작 build.gradle에 아래와 같이 설정한다. plugins { id 'org.springframework.boot' version '2.7.1' id 'io.spri..

SpringBoot 2022.07.15

Docker로 프로젝트(Springboot), DB(Postgres), 캐시(Redis) 연동하기

취미생활로 프로젝트를 하나 시작했다. 아직 github에 push 하진 않았지만 시작 중 방법을 올려보려고 한다. # Use postgres/example user/password credentials version: '3' services: goose-auth-api: image: gudrb963/goose-auth-api:latest container_name: goose-auth-api build: context: . ports: - 8080:8080 depends_on: - postgres environment: - SPRING_DATASOURCE_URL=jdbc:postgresql://postgres:5432/gooseauth - SPRING_DATASOURCE_USERNAME=gooseauth..

Docker 2022.07.15

docker 이미지 생성, docker hub 업로드, docker springboot mysql 연동

application.yml 혹은 application.properties 파일 수정 ​ 우선 local에서 작업한 springboot 프로젝트를 docker 이미지로 뽑아내기 위해 application.yml 혹은 application.properties 파일을 수정해야한다. //application.properties spring.datasource.url=jdbc:mysql://my_mysql:3306/mydatabase?useSSL=false&useUnicode=true&serverTimezone=Asia/Seoul&allowPublicKeyRetrieval=true application.properties 내용에 위 내용 말고도 다른 내용이 많을 것으로 예상된다. localhost 혹은 127...

Docker 2021.10.22

Docker 설치 mysql 설치 및 실행하기 Ubuntu 18.04

현재 서버에는 mysql 없음 ko@ko-MS-16F1:~$ mysql Command 'mysql' not found, but can be installed with: sudo apt install mysql-client-core-5.7 sudo apt install mariadb-client-core-10.1 설치 시작 ​ ​ Docker 저장소 설정 sudo apt-get update # 패키지 다운로드 sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common # Docker GPG 키 추가 sudo curl -fsSL https://download.docker.com/linux..

Docker 2021.10.22

docker tomcat HTTP 상태 404 – 찾을 수 없음

synology nas를 사용했다 ​ 최신버전 다운받고 ​ 기본 설정 (포트번호 8080)으로 바로 실행 후 켜보니 404 오류가 나왔다. ​ GUI에서 안되길래 답답해서 ssh 환경에서 진행했다. ​ 아래처럼 해결했다. ~$ docker run -d --name myTomcat -p 8080:8080 tomcat:latest ~$ docker exec -it myTomcat /bin/bash ~$ mv webapps webapps2 ~$ mv webapps.dist/ webapps ~$ exit IT WORKS ​ https://forums.docker.com/t/tomcat-give-error-404/95130 Tomcat give error 404 Hi guys, After running tomca..

Docker 2021.10.22