Skip to content

Commit 7d18e4a

Browse files
authored
[SSD-156] 문서화 작업 (#95)
* [SSD-156] docs: ERD * [SSD-156] refactor: 환경변수 파일 정리 * [SSD-156] refactor: 환경변수 정리
1 parent ec526b2 commit 7d18e4a

File tree

8 files changed

+22
-24
lines changed

8 files changed

+22
-24
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ $RECYCLE.BIN/
6464

6565
.env
6666
.env.local
67+
.env.local.copy
6768

6869
# Created by https://www.toptal.com/developers/gitignore/api/intellij,visualstudiocode
6970
# Edit at https://www.toptal.com/developers/gitignore?templates=intellij,visualstudiocode

backend/compose.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ services:
77
ports:
88
- "${DATABASE_PORT}:3306"
99
environment:
10-
MYSQL_ROOT_PASSWORD: ${MYSQL_ROOT_PASSWORD}
11-
MYSQL_DATABASE: ${MYSQL_DATABASE}
10+
MYSQL_ROOT_PASSWORD: ${DATABASE_PASSWORD}
11+
MYSQL_DATABASE: ${DATABASE_NAME}
1212
TZ: Asia/Seoul
1313
volumes:
1414
- mysql-volume:/var/lib/mysql

backend/src/main/java/com/timepaper/backend/global/auth/token/util/JWTUtil.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ public class JWTUtil {
2323
private static final Logger log = LoggerFactory.getLogger(JWTUtil.class);
2424
private final long tokenValidityInMilliseconds = 1000L * 60 * 60 * 24 * 7; // 개발용 7일
2525

26-
@Value("${jwt.secret}")
26+
@Value("${JWT_SECRET}")
2727
private String secretKey;
2828

2929
@PostConstruct

backend/src/main/java/com/timepaper/backend/global/config/WebConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ public class WebConfig implements WebMvcConfigurer {
1414
@Override
1515
public void addCorsMappings(CorsRegistry registry) {
1616
registry.addMapping("/**")
17-
.allowedOrigins("http://localhost:5173", origin) //임시 배포시 변경
17+
.allowedOrigins(origin)
1818
.allowedMethods("GET", "POST", "PUT", "DELETE", "OPTIONS", "PATCH")
1919
.allowedHeaders("*")
2020
.allowCredentials(true)

backend/src/main/resources/application.properties

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ spring.jpa.show-sql=true
77
spring.jpa.hibernate.ddl-auto=update
88
spring.docker.compose.lifecycle-management=start-and-stop
99
logging.level.org.springframework.security=DEBUG
10-
jwt.secret=${JWT_SECRET}
1110
spring.data.redis.host=${REDIS_HOST}
1211
spring.data.redis.port=${REDIS_PORT}
1312
spring.data.redis.password=${REDIS_PASSWORD}

docker-compose-local.yml

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
services:
22
mysql:
3-
container_name: mysql-container-test
3+
container_name: mysql-container-local
44
image: mysql:8.0
55
volumes:
66
- db-volume:/var/lib/mysql
@@ -15,7 +15,7 @@ services:
1515
retries: 3
1616
start_period: 30s
1717
redis:
18-
container_name: redis-container-test
18+
container_name: redis-container-local
1919
image: redis:latest
2020
volumes:
2121
- redis-volume:/data
@@ -31,20 +31,11 @@ services:
3131
retries: 3
3232
start_period: 10s
3333
api:
34-
container_name: api-container-test
34+
container_name: api-container-local
3535
build:
3636
context: ./backend
37-
#이미지 레이어 캐싱 적용
38-
cache_to:
39-
- type=local,dest=/tmp/.build-cache/api,mode=max
40-
cache_from:
41-
- type=local,src=/tmp/.build-cache/api
42-
image: yejinoh58/timepaper-api-image:local
4337
env_file:
4438
- .env.local
45-
# 임시로 포트 포워딩
46-
ports:
47-
- "8082:8080"
4839
networks:
4940
- db-network
5041
- cache-network
@@ -55,18 +46,13 @@ services:
5546
redis:
5647
condition: service_healthy
5748
client:
58-
container_name: client-container-test
49+
container_name: client-container-local
5950
build:
6051
context: ./frontend
6152
dockerfile: Dockerfile.local
62-
cache_to:
63-
- type=local,dest=/tmp/.build-cache/client,mode=max
64-
cache_from:
65-
- type=local,src=/tmp/.build-cache/client
6653
args:
6754
VITE_API_URL: ${VITE_API_URL}
6855
VITE_KAKAO_API_KEY: ${VITE_KAKAO_API_KEY}
69-
image: yejinoh58/timepaper-client-image:local
7056
env_file:
7157
- .env.local
7258
ports:

docs/ERD.svg

Lines changed: 12 additions & 0 deletions
Loading

frontend/conf.d/default.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ server {
99
}
1010

1111
location /api {
12-
proxy_pass http://api-container-test:8080;
12+
proxy_pass http://api-container-local:8080;
1313

1414
# 요청 헤더 설정
1515
proxy_http_version 1.1; # HTTP/1.1 사용 (Keep-Alive가 기본값, 지속적 연결 지원, 파이프라이닝 가능)

0 commit comments

Comments
 (0)