Skip to content

Commit

Permalink
📝 docs: docker-compose.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
moonwonki authored May 2, 2024
1 parent 65e2c9a commit 1df348e
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
version: '3'
services:
mysql:
image: mysql:latest
restart: always
environment:
MYSQL_ROOT_PASSWORD: your_root_password
MYSQL_DATABASE: your_database_name
ports:
- "3306:3306"
volumes:
- mysql_data:/var/lib/mysql

spring-app:
build:
context: .
dockerfile: Dockerfile
depends_on:
- mysql
ports:
- "8080:8080"
environment:
SPRING_DATASOURCE_URL: jdbc:mysql://mysql:3306/your_database_name
SPRING_DATASOURCE_USERNAME: your_mysql_username
SPRING_DATASOURCE_PASSWORD: your_mysql_password

volumes:
mysql_data:

0 comments on commit 1df348e

Please sign in to comment.