-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdocker-compose.yml
84 lines (83 loc) · 2.73 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
version: "3"
services:
byeoldam-database:
container_name: byeoldam-database
build:
dockerfile: Dockerfile
context: ./backend/database
image: lmw7414/byeoldam-database
volumes:
# 설정파일 저장될 위치
- ./backend/database/config:/etc/mysql/conf.d
# DB 데이터 저장 디렉토리
- /home/ubuntu/database/data:/var/lib/mysql
environment:
- MARIADB_DATABASE=byeol_dam
- MARIADB_USER=${SPRING_DATASOURCE_USERNAME}
- MARIADB_ROOT_PASSWORD=${SPRING_DATASOURCE_PASSWORD}
- "TZ=Asia/Seoul"
command:
- --character-set-server=utf8mb4
- --collation-server=utf8mb4_unicode_ci
ports:
- "3306:3306"
byeoldam-redis:
container_name: byeoldam-redis
build:
dockerfile: Dockerfile
context: ./backend/redis
image: lmw7414/byeoldam-redis
ports:
- "6379:6379"
byeoldam-mongodb:
container_name: byeoldam-mongodb
#build:
#dockerfile: Dockerfile
#context: ./mongodb
image: mongo:latest
volumes:
# DB 데이터 저장 파일
- /home/ubuntu/database/mongo_data:/data/db
- ./backend/mongodb/config/mongod.conf:/etc/mongod.conf
environment:
- MONGO_INITDB_DATABASE=byeol_dam
- MONGO_INITDB_ROOT_USERNAME=${SPRING_DATASOURCE_USERNAME}
- MONGO_INITDB_ROOT_PASSWORD=${SPRING_DATASOURCE_PASSWORD}
ports:
- "27017:27017"
byeoldam-app:
container_name: byeoldam-app
build: ./backend
depends_on: # DB, Redis 실행 후 실행
- byeoldam-database
- byeoldam-redis
- byeoldam-mongodb
image: lmw7414/byeoldam-app
environment:
- SPRING_DATASOURCE_USERNAME=${SPRING_DATASOURCE_USERNAME}
- SPRING_DATASOURCE_PASSWORD=${SPRING_DATASOURCE_PASSWORD}
- SPRING_PROFILES_ACTIVE=${SPRING_PROFILES_ACTIVE}
- JWT_SECRET_KEY_CODE=${JWT_SECRET_KEY_CODE}
- JWT_TOKEN_SECRET=${JWT_TOKEN_SECRET}
- EMAIL_APP_PASSWORD=${EMAIL_APP_PASSWORD}
- GOOGLE_OAUTH_CLIENT_ID=${GOOGLE_OAUTH_CLIENT_ID}
- GOOGLE_OAUTH_CLIENT_SECRET=${GOOGLE_OAUTH_CLIENT_SECRET}
- KAKAO_OAUTH_CLIENT_ID=${KAKAO_OAUTH_CLIENT_ID}
- KAKAO_OAUTH_CLIENT_SECRET=${KAKAO_OAUTH_CLIENT_SECRET}
- NAVER_OAUTH_CLIENT_ID=${NAVER_OAUTH_CLIENT_ID}
- NAVER_OAUTH_CLIENT_SECRET=${NAVER_OAUTH_CLIENT_SECRET}
ports:
- "8081:8081"
restart: always
byeoldam-frontend:
container_name: "byeoldam-frontend"
build:
context: "./frontend"
dockerfile: "Dockerfile"
ports:
- "5173:5173"
environment:
- VITE_BASE_URL=${VITE_BASE_URL}
- VITE_GOOGLE_REDIRECT_URI=${VITE_GOOGLE_REDIRECT_URI}
- VITE_NAVER_REDIRECT_URI=${VITE_NAVER_REDIRECT_URI}
- VITE_KAKAO_REDIRECT_URI=${VITE_KAKAO_REDIRECT_URI}