-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.sh
executable file
·31 lines (24 loc) · 1.38 KB
/
build.sh
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
#!/bin/bash
# Set PROJECT_NAME
PROJECT_NAME="clinical-ai-monitor"
# Set BUILD_ID
export BUILD_ID=$(date +%Y%m%d)
# # Build development images
docker compose --env-file .env.development -f docker-compose.dev.yml build
# Build production images
docker compose --env-file .env.production -f docker-compose.yml build
# Tag development images as latest
docker tag vectorinstitute/${PROJECT_NAME}:frontend-dev-${BUILD_ID} vectorinstitute/${PROJECT_NAME}:frontend-dev-latest
docker tag vectorinstitute/${PROJECT_NAME}:backend-dev-${BUILD_ID} vectorinstitute/${PROJECT_NAME}:backend-dev-latest
# Tag production images as latest
docker tag vectorinstitute/${PROJECT_NAME}:frontend-${BUILD_ID} vectorinstitute/${PROJECT_NAME}:frontend-latest
docker tag vectorinstitute/${PROJECT_NAME}:backend-${BUILD_ID} vectorinstitute/${PROJECT_NAME}:backend-latest
# Push all images (uncomment when ready to push)
docker push vectorinstitute/${PROJECT_NAME}:frontend-dev-${BUILD_ID}
docker push vectorinstitute/${PROJECT_NAME}:backend-dev-${BUILD_ID}
docker push vectorinstitute/${PROJECT_NAME}:frontend-${BUILD_ID}
docker push vectorinstitute/${PROJECT_NAME}:backend-${BUILD_ID}
docker push vectorinstitute/${PROJECT_NAME}:frontend-dev-latest
docker push vectorinstitute/${PROJECT_NAME}:backend-dev-latest
docker push vectorinstitute/${PROJECT_NAME}:frontend-latest
docker push vectorinstitute/${PROJECT_NAME}:backend-latest