-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
65 lines (63 loc) · 1.74 KB
/
docker-compose.dev.yml
File metadata and controls
65 lines (63 loc) · 1.74 KB
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
57
58
59
60
61
62
63
64
65
version: '3'
services:
api:
build:
context: ./popuniv-spring/.
dockerfile: Dockerfile
ports:
- 8080:8080
environment:
- ENV=development
- SPRING_DATASOURCE_URL=jdbc:mysql://mysql:3306/qa?useSSL=false&allowPublicKeyRetrieval=true&serverTimezone=UTC&useUnicode=yes&characterEncoding=UTF-8
- SPRING_DATASOURCE_USERNAME=root
- SPRING_DATASOURCE_PASSWORD=rootpass
- SPRING_DATA_REDIS_HOST=redis_test
- SPRING_DATA_REDIS_PORT=6379
restart: on-failure
depends_on:
redis:
condition: service_healthy
# mysql:
# condition: service_healthy
vite-dev:
image: popuniv-web
build:
context: ./popuniv-react
dockerfile: Dockerfile
env_file:
- ./popuniv-react/.env.local
volumes:
- ./popuniv-react/:/app
- /app/node_modules
- /app/.next
restart: always
ports:
- 4173:4173
redis:
image: redis:alpine
container_name: redis
hostname: redis_test
ports:
- 6379:6379
environment:
- ALLOW_EMPTY_PASSWORD=yes
healthcheck:
test: redis-cli --raw incr ping
interval: 5s
mysql:
container_name: mysql_db
image: mysql:8.3
ports:
- 3306:3306
environment:
MYSQL_ROOT_PASSWORD: 'rootpass'
MYSQL_DATABASE: qa
command: # 명령어 실행
- '--character-set-server=utf8mb4'
- '--collation-server=utf8mb4_unicode_ci'
volumes:
- ./mysql/conf.d:/etc/mysql/conf.d
- ./mysql/data:/var/lib//mysql # mysql/data에 데이터를 담을 때 사용 합니다.
- ./mysql/initdb.d:/docker-entrypoint-initdb.d #intidb.d의 create.sql을 실행
healthcheck:
test: mysql -h 127.0.0.1 -u root --password=rootpass qa -e 'SHOW TABLES'