Skip to content

Commit e61dec4

Browse files
authored
Update config.yml
1 parent 52a2ed0 commit e61dec4

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

.circleci/config.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,19 @@ jobs:
1212
name: Build Docker image
1313
command: |
1414
docker build -t $DOCKER_USER/node-js-sample .
15+
16+
# Lancer l'application dans le conteneur Docker
17+
- run:
18+
name: Run Docker container
19+
command: |
20+
docker run -d -p 8080:8080 --name nodejs-sample $DOCKER_USER/node-js-sample
1521
22+
# Vérifier la route / de l'application avec curl
23+
- run:
24+
name: Verify application is running
25+
command: |
26+
curl -f http://localhost:8080/ || (echo "Application failed to start" && exit 1)
27+
1628
# Pousser l'image Docker vers Docker Hub (ou un autre registre)
1729
- run:
1830
name: Push Docker image to Docker Hub

0 commit comments

Comments
 (0)