-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
57 lines (50 loc) · 1.24 KB
/
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
version: '3'
volumes:
starter-postgresql_db_vol:
driver: local
starter_mysql_db_vol:
driver: local
services:
# postgres:
# image: "postgres:14.5"
# container_name: starter-postgresql-db
# restart: always
# environment:
# POSTGRES_USER: postgres
# POSTGRES_PASSWORD: asdf
# POSTGRES_DB: starter
# expose:
# - "5432"
# ports:
# - "5432:5432"
# volumes:
# - starter-postgresql_db_vol:/var/lib/postgresql/data
mysql:
container_name: mysql
image: mysql/mysql-server:8.0
restart: always
command:
- --default-authentication-plugin=mysql_native_password
- --character-set-server=utf8mb4
- --collation-server=utf8mb4_unicode_520_ci
environment:
MYSQL_ROOT_PASSWORD: password
MYSQL_USER: user
MYSQL_PASSWORD: password
MYSQL_DATABASE: starter_mysql_db
MYSQL_ROOT_HOST: "%"
ports:
- '33080:3306'
volumes:
- starter_mysql_db_vol:/var/lib/mysql
server:
container_name: spring
build:
context: ./
dockerfile: ./Dockerfile
environment:
SPRING_DATASOURCE_URL: jdbc:mysql://mysql:3306/starter_mysql_db?autoReconnect=true&useSSL=false
depends_on:
- mysql
ports:
- "8000:8000"