Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Fix] docker compose 스크립트 수정 #156

Merged
merged 2 commits into from
Nov 24, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions app/backend/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ services:
build:
context: ../..
dockerfile: app/backend/Dockerfile
ports:
- "8080:8080" # 호스트의 포트:컨테이너의 포트
environment:
- DATABASE_URL=mysql://mokak:_mokak123@db:3306/testDB
- REDIS_PORT=${REDIS_PORT}
Expand All @@ -17,15 +15,17 @@ services:
depends_on:
- db
- redis
volumes:
- prisma-migrations:/app/prisma/migrations
Comment on lines +18 to +19
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

해당 부분 스크립트 조절로 인해서 마이그레이션에서 어떠한 점이 바뀐 걸까요 ??

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

프리즈마에서 마이그레이션 정보가 prisma/migrations에 저장 되잖아요? 그걸 Docker 컨테이너에서 host os의 드라이브에 마운트 했다고 생각하면 됩니다.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

아하!! 이번에 일어난 오류를 해결하는 스크립트 수정이 이 부분이겠네요.
고생하셨습니다!


db:
image: 192.168.122.133:9993/morak-mysql:latest
ports:
- "3306:3306"
image: ccxz84/morak-mysql:latest
environment:
- MYSQL_ROOT_PASSWORD=anl@oiq12^&()
volumes:
- mysql-data:/var/lib/mysql
expose:
- "3306"

redis:
image: redis:alpine
Expand All @@ -34,3 +34,4 @@ services:

volumes:
mysql-data:
prisma-migrations: