Compare commits
	
		
			3 Commits
		
	
	
		
			1f0874cbc3
			...
			4b27f92bbf
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						 | 
					4b27f92bbf | ||
| 
						 | 
					3bd836e5d8 | ||
| 
						 | 
					630fa76786 | 
							
								
								
									
										19
									
								
								Dockerfile
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								Dockerfile
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,19 @@
 | 
			
		||||
# --- build stage ---
 | 
			
		||||
FROM gradle:8.10.2-jdk17-alpine AS build
 | 
			
		||||
WORKDIR /workspace
 | 
			
		||||
COPY . .
 | 
			
		||||
# 테스트는 생략(필요시 제거)
 | 
			
		||||
RUN ./gradlew --no-daemon clean bootJar -x test
 | 
			
		||||
 | 
			
		||||
# --- run stage ---
 | 
			
		||||
FROM eclipse-temurin:17-jre-alpine
 | 
			
		||||
WORKDIR /app
 | 
			
		||||
RUN apk add --no-cache tzdata && cp /usr/share/zoneinfo/Asia/Seoul /etc/localtime
 | 
			
		||||
# 로그 디렉터리 생성 및 권한 설정
 | 
			
		||||
RUN mkdir -p /app/logs && chown -R 1000:1000 /app
 | 
			
		||||
RUN addgroup -S app && adduser -S app -G app -u 1000
 | 
			
		||||
USER app
 | 
			
		||||
COPY --from=build /workspace/build/libs/*.jar /app/app.jar
 | 
			
		||||
EXPOSE 8080
 | 
			
		||||
ENV JAVA_OPTS="-Xms256m -Xmx512m"
 | 
			
		||||
ENTRYPOINT ["sh","-c","java $JAVA_OPTS -jar /app/app.jar"]
 | 
			
		||||
							
								
								
									
										51
									
								
								nginx-1.28.0/conf/nginx_docker_bak.conf
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										51
									
								
								nginx-1.28.0/conf/nginx_docker_bak.conf
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,51 @@
 | 
			
		||||
 | 
			
		||||
events {
 | 
			
		||||
    worker_connections 1024;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
http {
 | 
			
		||||
 | 
			
		||||
    include mime.types;
 | 
			
		||||
    default_type application/octet-stream;
 | 
			
		||||
    sendfile on;
 | 
			
		||||
    keepalive_timeout 65;
 | 
			
		||||
 | 
			
		||||
    # (선택) 로그 위치
 | 
			
		||||
    access_log /var/log/nginx/access.log;
 | 
			
		||||
    error_log  /var/log/nginx/error.log warn;
 | 
			
		||||
 | 
			
		||||
    # 웹소켓용
 | 
			
		||||
    map $http_upgrade $connection_upgrade {
 | 
			
		||||
        default upgrade;
 | 
			
		||||
        ''      close;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    server {
 | 
			
		||||
        listen 80;
 | 
			
		||||
        server_name localhost;
 | 
			
		||||
 | 
			
		||||
        # Nuxt(개발서버 3000)
 | 
			
		||||
        location / {
 | 
			
		||||
            proxy_pass http://frontend:3000;
 | 
			
		||||
            proxy_set_header Host $host;
 | 
			
		||||
            proxy_set_header X-Real-IP $remote_addr;
 | 
			
		||||
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
 | 
			
		||||
            proxy_http_version 1.1;
 | 
			
		||||
            proxy_set_header X-Forwarded-Proto $scheme;
 | 
			
		||||
            proxy_set_header Upgrade $http_upgrade;
 | 
			
		||||
            proxy_set_header Connection $connection_upgrade;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        # Spring Boot(8080)
 | 
			
		||||
        location /service/ {
 | 
			
		||||
            proxy_pass http://backend:8080;
 | 
			
		||||
            proxy_set_header Host $host;
 | 
			
		||||
            proxy_set_header X-Real-IP $remote_addr;
 | 
			
		||||
            proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
 | 
			
		||||
            proxy_set_header X-Forwarded-Proto $scheme;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        # (선택) 업로드 크게 받을 때
 | 
			
		||||
        # client_max_body_size 50m;
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user