File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6060 fi
6161 else
6262 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
6565 fi
6666
6767 # Step 3: Wait for the database to be healthy.
@@ -78,17 +78,17 @@ jobs:
7878
7979 # Step 4: Build the new webapp image.
8080 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
8383
8484 # Step 5: Forcefully remove the old webapp container to prevent conflicts.
8585 echo "Forcefully removing old webapp container if it exists..."
8686 docker rm -f codebuilder-webapp || true
8787
8888 # Step 6: Deploy the new webapp container.
8989 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
9292
9393 - name : ' 🗑 Prune Old Docker Images'
9494 if : always()
Original file line number Diff line number Diff line change 11version : ' 3.8'
22
33services :
4+
45 db :
56 image : postgres:13-alpine
6- container_name : nest -db
7+ container_name : codebuilder -db
78 environment :
89 POSTGRES_USER : ${DB_USER:-nestjs}
910 POSTGRES_PASSWORD : ${DB_PASSWORD:-nestpass}
1011 POSTGRES_DB : ${DB_NAME:-nestdb}
1112 volumes :
12- - db-data:/var/lib/postgresql/data
13+ - codebuilder- db-data:/var/lib/postgresql/data
1314 networks :
1415 - codebuilder-net
1516
16- nest- api :
17+ api :
1718 build :
1819 context : .
1920 dockerfile : Dockerfile
20- container_name : nest -api
21+ container_name : codebuilder -api
2122 environment :
2223 DB_HOST : db
2324 DB_PORT : 5432
@@ -33,8 +34,9 @@ services:
3334 networks :
3435 - codebuilder-net
3536
37+
3638volumes :
37- db-data :
39+ codebuilder- db-data :
3840
3941networks :
4042 codebuilder-net :
You can’t perform that action at this time.
0 commit comments