Skip to content

Commit

Permalink
chore: profile env
Browse files Browse the repository at this point in the history
  • Loading branch information
essential2189 committed Jan 22, 2024
1 parent bfad0ad commit 5ea31a5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 23 deletions.
5 changes: 1 addition & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
FROM openjdk:17-alpine AS builder

ARG PROFILE
ENV PROFILE = ${PROFILE}
ENV PROFILE=${PROFILE}

WORKDIR /build

Expand All @@ -28,9 +28,6 @@ RUN ./gradlew build -x test --parallel --stacktrace
#######################################
FROM openjdk:17-alpine

ARG PROFILE
ENV PROFILE=${PROFILE}

# 빌더 이미지에서 JAR 파일 복사
COPY --from=builder /build/build/libs/*.jar /app.jar

Expand Down
34 changes: 15 additions & 19 deletions compose.yaml
Original file line number Diff line number Diff line change
@@ -1,25 +1,21 @@
version: "3"

services:
# spring_app:
# platform: linux/amd64
# container_name: today_popup
# restart: on-failure
# build:
# context: ./
# dockerfile: Dockerfile
# ports:
# - "8080:8080"
# environment:
# SPRING_DATASOURCE_URL: jdbc:mysql://db_mysql:3306/today_popup?useSSL=false&allowPublicKeyRetrieval=true&characterEncoding=UTF-8&serverTimezone=KST
# SPRING_DATASOURCE_USERNAME: root
# SPRING_DATASOURCE_PASSWORD: root
# SPRING_DATASOURCE_DRIVER_CLASS_NAME: com.mysql.cj.jdbc.Driver
# TZ: KST
# depends_on:
# - db_mysql
# networks:
# - today-popup-network
spring_app:
platform: linux/amd64
container_name: today_popup
restart: on-failure
build:
context: ./
dockerfile: Dockerfile
ports:
- "8080:8080"
environment:
env: dev
depends_on:
- db_mysql
networks:
- today-popup-network

db_mysql:
platform: linux/amd64
Expand Down

0 comments on commit 5ea31a5

Please sign in to comment.