Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 19 additions & 5 deletions compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
2 changes: 1 addition & 1 deletion manifests/app-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ spec:
spec:
containers:
- name: cont-1
image: mustafaflm.azurecr.io/app:128
image: saiyaswanth76/k8s01:appimage
ports:
- containerPort: 8080
imagePullSecrets:
Expand Down
2 changes: 1 addition & 1 deletion manifests/db-deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ spec:
spec:
containers:
- name: cont-1
image: mustafaflm.azurecr.io/db:129
image: saiyaswanth76/k8s01:dbimage
ports:
- containerPort: 3306
imagePullSecrets:
Expand Down