Skip to content

Commit 3582edc

Browse files
committed
feat: app dockerized & composed with mysql
1 parent 0950cdd commit 3582edc

File tree

2 files changed

+32
-0
lines changed

2 files changed

+32
-0
lines changed

Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
FROM openjdk:8-alpine
2+
MAINTAINER "Ramazan Sakin"
3+
ADD target/spring-boot-security-jwt-0.0.1-SNAPSHOT.jar spring-boot-security-jwt-0.0.1-SNAPSHOT.jar
4+
EXPOSE 8080
5+
ENTRYPOINT ["java", "-jar", "spring-boot-security-jwt-0.0.1-SNAPSHOT.jar"]

docker-compose.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
version: "3.8"
2+
services:
3+
spring-boot-jwt-auth:
4+
build: .
5+
image: spring-boot-jwt-auth-img
6+
ports:
7+
- "8080:8080"
8+
environment:
9+
- spring.profiles.active=docker
10+
depends_on:
11+
- mysqldb
12+
restart: on-failure
13+
14+
mysqldb:
15+
image: mysql:5.7
16+
ports:
17+
- "3306:3306"
18+
environment:
19+
- MYSQL_USER=root
20+
- MYSQL_ROOT_PASSWORD=123456
21+
- MYSQL_DATABASE=testdb
22+
restart: unless-stopped
23+
volumes:
24+
- db:/var/lib/mysql
25+
26+
volumes:
27+
db:

0 commit comments

Comments
 (0)