Skip to content
Snippets Groups Projects
Commit 4dcbf572 authored by Burhan Akbar's avatar Burhan Akbar
Browse files

including docker-compose.yml changes

parent f480bbba
No related branches found
No related tags found
No related merge requests found
pipeline { pipeline {
agent any // Changed from "label 'my-agent-label'" agent any
options {
timeout(time: 30, unit: 'MINUTES')
}
stages { stages {
stage('Build') { stage('Build') {
steps { steps {
sh 'chmod +x gradlew' // to make gradlew executable sh 'chmod +x gradlew'
sh './gradlew clean build' // Limit memory usage for Gradle build
sh './gradlew --no-daemon --max-workers=1 clean build'
} }
} }
stage('Deploy with Docker') { stage('Deploy with Docker') {
steps { steps {
sh 'docker-compose down || true' sh 'docker-compose down || true'
// Clean up unused resources before deploying
sh 'docker system prune -f'
sh 'docker-compose up -d' sh 'docker-compose up -d'
} }
} }
} }
post {
always {
sh 'docker system prune -f || true'
cleanWs()
}
}
} }
\ No newline at end of file
...@@ -13,8 +13,8 @@ services: ...@@ -13,8 +13,8 @@ services:
deploy: deploy:
resources: resources:
limits: limits:
cpus: '0.5' cpus: '1'
memory: 512M memory: 1024M
networks: networks:
- healthcare_network - healthcare_network
...@@ -31,7 +31,7 @@ services: ...@@ -31,7 +31,7 @@ services:
resources: resources:
limits: limits:
cpus: '1' cpus: '1'
memory: 1G memory: 1536M
networks: networks:
- healthcare_network - healthcare_network
depends_on: depends_on:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment