-
Notifications
You must be signed in to change notification settings - Fork 0
/
docker-compose-local.yml
71 lines (70 loc) · 1.62 KB
/
docker-compose-local.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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
version: "3.1"
# 실행하려는 컨테이너들 정의
services:
# 서비스명
redis:
# 사용할 이미지
image: redis:latest
# 컨테이너명
container_name: local-redis
command: redis-server --port 6379
restart: always
# manifest 에러로 인한 추가
platform: linux/arm64/v8
networks:
backend:
ipv4_address: 192.168.1.2
# 접근 포트 설정(컨테이너 외부:컨테이너 내부)
ports:
- 6379:6379
# 컨테이너에 docker label을 이용해서 메타데이터 추가
labels:
- "name=redis"
- "mode=standalone"
volumes:
- ./redis/data/:/data
mysql:
image: mysql:8.0.33
container_name: local-mysql
restart: always
platform: linux/arm64/v8
networks:
backend:
ipv4_address: 192.168.1.3
ports:
- 3306:3306
environment:
- TZ=Asia/Seoul
- MYSQL_HOST=localhost
- MYSQL_PORT=3306
- MYSQL_ROOT_PASSWORD=1234
- MYSQL_DATABASE=tenduck
- MYSQL_USER=duck
- MYSQL_PASSWORD=1234
volumes:
- ./mysql/conf.d:/etc/mysql/conf.d:ro
- ./mysql/data:/var/lib/mysql:rw
- ./mysql/initdb.d:/docker-entrypoint-initdb.d:ro
playlist_be:
build:
context: .
dockerfile: Dockerfile
container_name: app
restart: always
networks:
backend:
ipv4_address: 192.168.1.4
ports:
- 8080:8080
depends_on:
- redis
- mysql
environment:
- ACTIVE_PROFILES=local-compose
networks:
backend:
driver: bridge
ipam:
config:
- subnet: 192.168.1.0/24
gateway: 192.168.1.254