Created
June 29, 2019 01:14
-
-
Save rmsaitam/4498c36db1803833659d0d504c669d94 to your computer and use it in GitHub Desktop.
Docker-compose Java com Spring boot
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
version: '3' | |
services: | |
mysql: | |
container_name: mysql_server | |
image: mysql/mysql-server:5.7 | |
environment: | |
MYSQL_DATABASE: admin | |
MYSQL_ROOT_PASSWORD: secret | |
MYSQL_ROOT_HOST: '%' | |
ports: | |
- "3306:3306" | |
restart: always | |
app: | |
build: . | |
volumes: | |
- .:/app | |
- ~/.m2:/root/.m2 | |
working_dir: /app | |
ports: | |
- 8080:8080 | |
command: mvn clean spring-boot:run | |
depends_on: | |
- mysql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment