Skip to content

Instantly share code, notes, and snippets.

@rmsaitam
Created June 29, 2019 01:14
Show Gist options
  • Save rmsaitam/4498c36db1803833659d0d504c669d94 to your computer and use it in GitHub Desktop.
Save rmsaitam/4498c36db1803833659d0d504c669d94 to your computer and use it in GitHub Desktop.
Docker-compose Java com Spring boot
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