diff --git a/compose.yml b/compose.yml index 9ff0dc6..a47ae48 100644 --- a/compose.yml +++ b/compose.yml @@ -2,25 +2,39 @@ version: "3.9" services: devopsdb: - image: shaikmustafa/automation:db + image: saiyaswanth76/automation:db ports: - "3306:3306" deploy: - replicas: 3 + resources: + limits: + cpus: "0.5" + memory: 128M + reservations: + cpus: "0.25" + replicas: 1 # Reduced to 1 to prevent DB split-brain networks: - mynetwork + volumes: + - database:/data application: - image: shaikmustafa/automation:app + image: saiyaswanth76/automation:app ports: - "1111:8080" deploy: replicas: 3 - depends_on: - - devopsdb + # depends_on: # Commented out as Swarm ignores this + # - devopsdb networks: - mynetwork + volumes: + - appdata:/yash networks: mynetwork: driver: overlay + +volumes: + database: + appdata: diff --git a/manifests/app-deployment.yml b/manifests/app-deployment.yml index 281d8a3..b8b4e49 100644 --- a/manifests/app-deployment.yml +++ b/manifests/app-deployment.yml @@ -15,7 +15,7 @@ spec: spec: containers: - name: cont-1 - image: mustafaflm.azurecr.io/app:128 + image: saiyaswanth76/k8s01:appimage ports: - containerPort: 8080 imagePullSecrets: diff --git a/manifests/db-deployment.yml b/manifests/db-deployment.yml index 52c4313..b6e9054 100644 --- a/manifests/db-deployment.yml +++ b/manifests/db-deployment.yml @@ -15,7 +15,7 @@ spec: spec: containers: - name: cont-1 - image: mustafaflm.azurecr.io/db:129 + image: saiyaswanth76/k8s01:dbimage ports: - containerPort: 3306 imagePullSecrets: