-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose.yml
42 lines (37 loc) · 1007 Bytes
/
docker-compose.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
version: '3.8'
services:
app:
image: companysystem:latest
build:
context: ./
dockerfile: Dockerfile
ports:
- "8080:8080"
- "35729:35729"
- "5005:5005"
volumes:
- ./:/app
- ./.m2:/root/.m2
working_dir: /app
command: sh run.sh
environment:
SPRING_DATASOURCE_URL: jdbc:mysql://db:3306/companysystemdatabase?autoReconnect=true&useSSL=false&allowPublicKeyRetrieval=true&createDatabaseIfNotExist=true
SPRING_DATASOURCE_USERNAME: admin
SPRING_DATASOURCE_PASSWORD: root
SERVER_PORT:
# _JAVA_OPTIONS:
# -Xdebug
# -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005
depends_on:
- db
db:
image: mysql:8.0.27
environment:
DATABASE_HOST: docker-mysql
DATABASE_PORT: 3306
MYSQL_DATABASE: companysystemdatabase
MYSQL_ROOT_PASSWORD: root
MYSQL_USER: admin
MYSQL_PASSWORD: root
volumes:
- ~/apps/mysql:/var/lib/mysql