-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcommand.txt
More file actions
50 lines (36 loc) · 1.61 KB
/
Copy pathcommand.txt
File metadata and controls
50 lines (36 loc) · 1.61 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
Make Model
npx prisma generate
Migrate Dev
1. Change the .env db to dev
2. Run command
npx prisma migrate dev --name
Migrate Staging/Prod
1. Change the .env db to staging/prod db
2. Run command
npx prisma migrate deploy
Seed DB
npx prisma db seed
Build Docker Image
docker build . -t mentoring-platform-api
Run Docker Container
docker run -p 8080:8080 -d mentoring-platform-api
##############################################################################################
GCLOUD CLOUD RUN DEPLOYMENT STEPS
##############################################################################################
Build Docker Image (change x to version. Current version: 0.0.4)
docker build -t gcr.io/dicoding-mp/mentoring-platform-api .
IF ASKING FOR PERMISSION
gcloud auth configure-docker
Push Docker Image to gcloud (change x to version. Current version: 0.0.4)
docker push gcr.io/dicoding-mp/mentoring-platform-api
Deploy Docker Image to gcloud (change x to version. Current version: 0.0.4)
gcloud run deploy --image gcr.io/dicoding-mp/mentoring-platform-api
##############################################################################################
docker build -t gcr.io/dicoding-mp/mentoring-platform-api .
docker push gcr.io/dicoding-mp/mentoring-platform-api
gcloud run deploy --image gcr.io/dicoding-mp/mentoring-platform-api
##############################################################################################
DEPLOY ML API
docker build -t gcr.io/dicoding-mp/mentoring-platform-ml-api: .
docker push gcr.io/dicoding-mp/mentoring-platform-ml-api
gcloud run deploy --image gcr.io/dicoding-mp/mentoring-platform-ml-api