Skip to content

Commit a23b781

Browse files
committed
[Fix]: 순서 바꿈
1 parent b06b045 commit a23b781

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

Dockerfile

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,15 @@ ARG PG_TOSS_SECRET_KEY
99
ENV PG_TOSS_CLIENT_KEY=${PG_TOSS_CLIENT_KEY}
1010
ENV PG_TOSS_SECRET_KEY=${PG_TOSS_SECRET_KEY}
1111

12-
# Add non-root user
13-
RUN addgroup -S spring && adduser -S spring -G spring
14-
USER spring:spring
15-
16-
# Copy pre-built jar from local build
12+
# Copy pre-built jar BEFORE switching user
1713
COPY build/libs/backend-0.0.1-SNAPSHOT.jar app.jar
1814

15+
# Add non-root user and change ownership
16+
RUN addgroup -S spring && adduser -S spring -G spring && \
17+
chown spring:spring /app/app.jar
18+
19+
USER spring:spring
20+
1921
# Expose port
2022
EXPOSE 8080
2123

src/main/java/com/backend/global/security/SecurityConfig.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@ public SecurityFilterChain securityFilterChain(HttpSecurity http) throws Excepti
3535
// 토스 리다이렉트용 정적 페이지..
3636
.requestMatchers("/billing.html", "/payments/**", "/toss/**").permitAll()
3737

38-
// 공개 API (기존)..
39-
38+
// 공개 API - 루트, 파비콘, h2-console, actuator health
4039
.requestMatchers("/", "/favicon.ico", "/h2-console/**", "/actuator/health").permitAll()
4140
.requestMatchers("/api/v1/auth/**", "/swagger-ui/**", "/v3/api-docs/**",
4241
"/swagger-ui.html", "/webjars/**", "/notifications/**", "/ws/**",

0 commit comments

Comments
 (0)