Skip to content

Commit

Permalink
Chore : 운영 환경 세팅
Browse files Browse the repository at this point in the history
  • Loading branch information
this-is-spear committed Jan 16, 2024
1 parent 64c8b21 commit 03906ab
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 12 deletions.
5 changes: 2 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ ARG PINPOINT_VERSION
ARG AGENT_ID
ARG APP_NAME
ENV JAVA_OPTS="-javaagent:/pinpoint-agent/pinpoint-bootstrap-${PINPOINT_VERSION}.jar -Dpinpoint.agentId=${AGENT_ID} -Dpinpoint.applicationName=${APP_NAME} -Dspring.profiles.active=${SPRING_PROFILES}"
ARG JAR_FILE=build/libs/*.jar
COPY ${JAR_FILE} app.jar
COPY ./build/libs/*SNAPSHOT.jar app.jar

CMD java ${JAVA_OPTS} app.jar
CMD echo 'sleep for initialze hbase' && sleep 30 && java -jar ${JAVA_OPTS} app.jar
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ plugins {
id "org.asciidoctor.jvm.convert" version "3.3.2"
}

group = 'numble'
group = 'bankingapi'
version = '0.0.1-SNAPSHOT'
sourceCompatibility = '17'

Expand Down
31 changes: 25 additions & 6 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,27 +18,26 @@ services:
- "8080"
environment:
SPRING_DATASOURCE_URL: jdbc:mysql://host.docker.internal:3307/money_transfer_service?characterEncoding=UTF-8&serverTimezone=Asia/Seoul
SPRING_DATASOURCE_USERNAME: "root"
SPRING_DATASOURCE_PASSWORD: "password!"
SPRING_DATASOURCE_USERNAME: 'root'
SPRING_DATASOURCE_PASSWORD: 'password!'
depends_on:
- pinpoint-web
- pinpoint-hbase
- pinpoint-agent
- pinpoint-collector
- money-transfer-database
networks:
- pinpoint

money-transfer-database:
image: mysql/mysql-server:latest-aarch64
image: mysql:8.0
environment:
MYSQL_DATABASE: money_transfer_service
MYSQL_ROOT_HOST: '%'
MYSQL_ROOT_PASSWORD: password!
MYSQL_ROOT_PASSWORD: 'password!'
TZ: 'Asia/Seoul'
ports:
- "3307:3306"
volumes:
- ./mysql/conf.d:/etc/mysql/conf.d
command:
- "mysqld"
- "--character-set-server=utf8mb4"
Expand All @@ -51,31 +50,43 @@ services:
extends:
file: ./pinpoint/docker-compose.yml
service: pinpoint-hbase
networks:
- pinpoint

pinpoint-web:
extends:
file: ./pinpoint/docker-compose.yml
service: pinpoint-web
networks:
- pinpoint

pinpoint-collector:
extends:
file: ./pinpoint/docker-compose.yml
service: pinpoint-collector
networks:
- pinpoint

pinpoint-agent:
extends:
file: ./pinpoint/docker-compose.yml
service: pinpoint-agent
networks:
- pinpoint

zoo1:
extends:
file: ./pinpoint/docker-compose.yml
service: zoo1
networks:
- pinpoint

zoo2:
extends:
file: ./pinpoint/docker-compose.yml
service: zoo2
networks:
- pinpoint

zoo3:
extends:
Expand All @@ -86,21 +97,29 @@ services:
extends:
file: ./pinpoint/docker-compose.yml
service: jobmanager
networks:
- pinpoint

taskmanager:
extends:
file: ./pinpoint/docker-compose.yml
service: taskmanager
networks:
- pinpoint

redis:
extends:
file: ./pinpoint/docker-compose.yml
service: redis
networks:
- pinpoint

pinpoint-mysql:
extends:
file: ./pinpoint/docker-compose.yml
service: pinpoint-mysql
networks:
- pinpoint

volumes:
data-volume:
Expand Down
9 changes: 9 additions & 0 deletions run.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
#!/bin/bash

# Git Submodule 업데이트

sudo git submodule update --init --recursive

if [ $? -ne 0 ]; then
echo "Git submodule update failed. Exiting script."
exit 1
fi

# Gradle 빌드 실행
sudo ./gradlew clean build

Expand Down
2 changes: 0 additions & 2 deletions src/main/resources/application-local.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,3 @@ spring:
show-sql: true
hibernate:
ddl-auto: create
naming:
physical-strategy: org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl

0 comments on commit 03906ab

Please sign in to comment.