Skip to content
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

release: 0.1.1 #67

Merged
merged 9 commits into from
Oct 2, 2024
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
4 changes: 2 additions & 2 deletions .github/workflows/pr-title-and-branch-validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: PR Title and Branch Name Validation

on:
pull_request:
types: [ opened, synchronize]
types: [ opened, synchronize, edited]
branches:
- main
- develop
Expand All @@ -12,7 +12,7 @@ on:
jobs:
validate-title-and-branch:
runs-on: ubuntu-latest
if: ${{ !(startsWith(github.head_ref, 'release/') && github.base_ref == 'develop') }} # release/* -> develop일 때는 실행하지 않음
if: ${{ !(startsWith(github.head_ref, 'release/') && github.base_ref == 'develop') && github.actor != 'jira' }} # release/* -> develop일 때는 실행하지 않음, 또한 Jira Bot이 실행하는 경우 무시
steps:
- name: Check out code
uses: actions/checkout@v3
Expand Down
16 changes: 0 additions & 16 deletions .github/workflows/release-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,6 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Create Tag
run: |
BRANCH_NAME="${{ github.event.pull_request.head.ref }}"
# 'release/' 또는 'hotfix/' 접두사를 제거
TAG_NAME="${BRANCH_NAME#release/}"
TAG_NAME="${TAG_NAME#hotfix/}"
# 태그 이름이 비어있을 경우 처리
if [ -z "$TAG_NAME" ]; then
echo "Error: TAG_NAME is empty. Please check the branch name."
exit 1
fi
git tag $TAG_NAME
git push origin $TAG_NAME
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Update Release
uses: release-drafter/release-drafter@v5
with:
Expand Down
94 changes: 48 additions & 46 deletions compose-local.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ services:
ports:
- "3306:3306"
volumes:
- ./mysql/data:/var/lib/mysql
- ./mysql/conf.d:/etc/mysql/conf.d
- chzz-mysql-data:/var/lib/mysql
command:
- "mysqld"
- "--character-set-server=utf8mb4"
Expand All @@ -34,48 +33,51 @@ services:
ports:
- "3000:3000"

node-exporter:
image: prom/node-exporter:latest
container_name: node-exporter
restart: unless-stopped
volumes:
- /proc:/host/proc:ro
- /sys:/host/sys:ro
- /:/rootfs:ro
command:
- '--path.procfs=/host/proc'
- '--path.rootfs=/rootfs'
- '--path.sysfs=/host/sys'
- '--collector.filesystem.mount-points-exclude=^/(sys|proc|dev|host|etc)($$|/)'
ports:
- "9100:9100"

prometheus:
image: prom/prometheus:latest
container_name: prometheus
volumes:
- ./monitoring/prometheus:/etc/prometheus
command:
- '--config.file=/etc/prometheus/prometheus.yml'
ports:
- "9090:9090"
# node-exporter:
# image: prom/node-exporter:latest
# container_name: node-exporter
# restart: unless-stopped
# volumes:
# - /proc:/host/proc:ro
# - /sys:/host/sys:ro
# - /:/rootfs:ro
# command:
# - '--path.procfs=/host/proc'
# - '--path.rootfs=/rootfs'
# - '--path.sysfs=/host/sys'
# - '--collector.filesystem.mount-points-exclude=^/(sys|proc|dev|host|etc)($$|/)'
# ports:
# - "9100:9100"
#
# prometheus:
# image: prom/prometheus:latest
# container_name: prometheus
# volumes:
# - ./monitoring/prometheus:/etc/prometheus
# command:
# - '--config.file=/etc/prometheus/prometheus.yml'
# ports:
# - "9090:9090"
#
# grafana:
# image: grafana/grafana:latest
# container_name: grafana
# volumes:
# - ./monitoring/grafana:/var/lib/grafana
# environment:
# - GF_SECURITY_ADMIN_PASSWORD=admin
# ports:
# - "3001:3000"
#
# loki:
# image: grafana/loki:latest
# container_name: loki
# ports:
# - "3100:3100"
# volumes:
# - ./monitoring/loki:/etc/loki
# - ./monitoring/loki-data:/tmp/loki
# command: -config.file=/etc/loki/loki-config.yaml

grafana:
image: grafana/grafana:latest
container_name: grafana
volumes:
- ./monitoring/grafana:/var/lib/grafana
environment:
- GF_SECURITY_ADMIN_PASSWORD=admin
ports:
- "3001:3000"

loki:
image: grafana/loki:latest
container_name: loki
ports:
- "3100:3100"
volumes:
- ./monitoring/loki:/etc/loki
- ./monitoring/loki-data:/tmp/loki
command: -config.file=/etc/loki/loki-config.yaml
volumes:
chzz-mysql-data:
2 changes: 2 additions & 0 deletions nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@
include /etc/letsencrypt/options-ssl-nginx.conf;
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem;

client_max_body_size 50M; # 최대 파일 업로드 크기 50MB로 설정

location / {
proxy_pass http://app;
proxy_set_header Host $host;
Expand Down
9 changes: 6 additions & 3 deletions src/main/java/org/chzz/market/common/error/ErrorResponse.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,20 @@
import lombok.Builder;

@Builder
public record ErrorResponse(String message,
public record ErrorResponse(String name,
String[] message,
int status) {
public static ErrorResponse from(final ErrorCode errorCode) {
return ErrorResponse.builder()
.name(errorCode.name())
.status(errorCode.getHttpStatus().value())
.message(errorCode.getMessage())
.message(new String[]{errorCode.getMessage()})
.build();
}

public static ErrorResponse of(final ErrorCode errorCode, final String detailedErrorMessage) {
public static ErrorResponse of(final ErrorCode errorCode, final String[] detailedErrorMessage) {
return ErrorResponse.builder()
.name(errorCode.name())
.status(errorCode.getHttpStatus().value())
.message(detailedErrorMessage)
.build();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ public enum GlobalErrorCode implements ErrorCode {
INVALID_REQUEST_PARAMETER(HttpStatus.BAD_REQUEST, "Invalid request parameter"),
UNSUPPORTED_PARAMETER_TYPE(HttpStatus.BAD_REQUEST, "Unsupported type of parameter included"),
UNSUPPORTED_PARAMETER_NAME(HttpStatus.BAD_REQUEST, "Unsupported name of parameter included"),
VALIDATION_FAILED(HttpStatus.BAD_REQUEST, "Validation failed"),
AUTHENTICATION_REQUIRED(HttpStatus.UNAUTHORIZED, "Authentication is required"),
ACCESS_DENIED(HttpStatus.FORBIDDEN, "Access is denied"),
UNSUPPORTED_SORT_TYPE(HttpStatus.BAD_REQUEST,"Unsupported type of sort" ),
Expand Down
Loading
Loading