Skip to content

Commit

Permalink
build : Docker-Compose 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
BlackBean99 committed Jul 23, 2023
1 parent 2e3611b commit a33a92d
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 40 deletions.
1 change: 0 additions & 1 deletion .github/workflows/BuildApiServer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ name: Build Api Server
on:
push:
branches:
- master
- develop
- release/*

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/CI_Check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
pull_request:
branches:
- develop
- master
- release
jobs:
build:
runs-on: ubuntu-latest
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/develop-branch-test-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
java-version: [ 17 ]
java-version: [ 11 ]
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: SetUp JDK 17
- name: SetUp JDK 11
uses: actions/setup-java@v2
with:
java-version: "17"
java-version: "11"
distribution: 'adopt'

- name: Cache SonarCloud packages
Expand Down
2 changes: 1 addition & 1 deletion IDP-Api/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM openjdk:11-jdk-slim
FROM adoptopenjdk/openjdk11

EXPOSE 8080

Expand Down
78 changes: 44 additions & 34 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,38 +1,48 @@
version: "3"
version: "3.7"
services:
db:
restart: always
image: mysql:8.0
ports:
- 3308:3306
environment:
- ./db/conf.d:/etc/mysql/conf.d
- ./db/data/:/var/lib/mysql/
- MYSQL_ROOT_PASSWORD=dltjgus119
- TZ=Asia/Seoul
- MYSQL_DATABASE=econovation
redis:
container_name: redis
image: redis
image: "redis:alpine"
ports:
- 6379:6379
command: ["redis-server", "--protected-mode", "no"]
extra_hosts:
- "host.docker.internal:host-gateway"
app:
build: .
- "6379:6379"
environment:
SPRING_DATASOURCE_URL: jdbc:mysql://db:3306/econovation?allowPublicKeyRetrieval=true&useSSL=false&useUnicode=true&serverTimezone=Asia/Seoul
SPRING_DATASOURCE_USERNAME: root
SPRING_DATASOURCE_PASSWORD: dltjgus119
container_name: spring-app
image: blackbean99/econovation_idp:latest
links:
- redis
ports:
- 8080:8080
depends_on:
- db
- redis
restart: always
tty: true
- TZ=Asia/Seoul

# ---------------------------------------------------------
#version: "3"
#services:
# db:
# restart: always
# image: mysql:8.0
# ports:
# - 3308:3306
# environment:
# - ./db/conf.d:/etc/mysql/conf.d
# - ./db/data/:/var/lib/mysql/
# - MYSQL_ROOT_PASSWORD=dltjgus119
# - TZ=Asia/Seoul
# - MYSQL_DATABASE=econovation
# redis:
# container_name: redis
# image: redis
# ports:
# - 6379:6379
# command: ["redis-server", "--protected-mode", "no"]
# extra_hosts:
# - "host.docker.internal:host-gateway"
# app:
# build: .
# environment:
# SPRING_DATASOURCE_URL: jdbc:mysql://db:3306/econovation?allowPublicKeyRetrieval=true&useSSL=false&useUnicode=true&serverTimezone=Asia/Seoul
# SPRING_DATASOURCE_USERNAME: root
# SPRING_DATASOURCE_PASSWORD: dltjgus119
# container_name: spring-app
# image: blackbean99/econovation_idp:latest
# links:
# - redis
# ports:
# - 8080:8080
# depends_on:
# - db
# - redis
# restart: always
# tty: true

0 comments on commit a33a92d

Please sign in to comment.