File tree Expand file tree Collapse file tree 2 files changed +13
-11
lines changed Expand file tree Collapse file tree 2 files changed +13
-11
lines changed Original file line number Diff line number Diff line change 60
60
fi
61
61
else
62
62
echo "Database container not found. Creating it..."
63
- # Added -p flag to associate with the correct stack
64
- docker compose -p codebuilder-frontend up -d db
63
+ # Use 'codebuilder' as the stack prefix
64
+ docker compose -p codebuilder up -d db
65
65
fi
66
66
67
67
# Step 3: Wait for the database to be healthy.
@@ -78,17 +78,17 @@ jobs:
78
78
79
79
# Step 4: Build the new webapp image.
80
80
echo "Building the latest webapp image..."
81
- # Added -p flag to ensure build context is correct
82
- docker compose -p codebuilder-frontend build webapp
81
+ # Use 'codebuilder' as the stack prefix
82
+ docker compose -p codebuilder build webapp
83
83
84
84
# Step 5: Forcefully remove the old webapp container to prevent conflicts.
85
85
echo "Forcefully removing old webapp container if it exists..."
86
86
docker rm -f codebuilder-webapp || true
87
87
88
88
# Step 6: Deploy the new webapp container.
89
89
echo "Deploying the new webapp container..."
90
- # Added -p flag to associate with the correct stack
91
- docker compose -p codebuilder-frontend up -d --no-deps webapp
90
+ # Use 'codebuilder' as the stack prefix
91
+ docker compose -p codebuilder up -d --no-deps webapp
92
92
93
93
- name : ' 🗑 Prune Old Docker Images'
94
94
if : always()
Original file line number Diff line number Diff line change 1
1
version : ' 3.8'
2
2
3
3
services :
4
+
4
5
db :
5
6
image : postgres:13-alpine
6
- container_name : nest -db
7
+ container_name : codebuilder -db
7
8
environment :
8
9
POSTGRES_USER : ${DB_USER:-nestjs}
9
10
POSTGRES_PASSWORD : ${DB_PASSWORD:-nestpass}
10
11
POSTGRES_DB : ${DB_NAME:-nestdb}
11
12
volumes :
12
- - db-data:/var/lib/postgresql/data
13
+ - codebuilder- db-data:/var/lib/postgresql/data
13
14
networks :
14
15
- codebuilder-net
15
16
16
- nest- api :
17
+ api :
17
18
build :
18
19
context : .
19
20
dockerfile : Dockerfile
20
- container_name : nest -api
21
+ container_name : codebuilder -api
21
22
environment :
22
23
DB_HOST : db
23
24
DB_PORT : 5432
@@ -33,8 +34,9 @@ services:
33
34
networks :
34
35
- codebuilder-net
35
36
37
+
36
38
volumes :
37
- db-data :
39
+ codebuilder- db-data :
38
40
39
41
networks :
40
42
codebuilder-net :
You can’t perform that action at this time.
0 commit comments