Skip to content

Commit

Permalink
chore: CI/CD를 위한 docker 추가
Browse files Browse the repository at this point in the history
Co-authored-by: hyoguoo <[email protected]>
  • Loading branch information
GiHoo and hyoguoo committed Feb 15, 2024
1 parent 2cbf6c2 commit 752da3e
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM openjdk:17
ARG JAR_FILE=./build/libs/algobaro-api-0.0.1-SNAPSHOT.jar
COPY ${JAR_FILE} app.jar
ENTRYPOINT ["java","-jar","/app.jar", "--spring.profiles.active=prod"]
29 changes: 29 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
version: "3"

services:
database:
container_name: mysql
image: mysql/mysql-server:latest
environment:
MYSQL_DATABASE: algobaro
MYSQL_USER: admin
MYSQL_PASSWORD: admin1234
MYSQL_ROOT_HOST: '%'
MYSQL_ROOT_PASSWORD: rootpwd
command:
- --default-authentication-plugin=mysql_native_password
ports:
- 3305:3306
networks:
- db_network
restart: always
mytamla:
build: .
expose:
- 8080
depends_on:
- database

networks:
db_network:
driver: bridge

0 comments on commit 752da3e

Please sign in to comment.