Skip to content

Commit 204ed56

Browse files
committed
docker compose file will be change
1 parent 0625bd5 commit 204ed56

2 files changed

Lines changed: 31 additions & 27 deletions

File tree

K8s/blog-deployment.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ metadata:
1212
apiVersion: v1
1313
kind: Service
1414
metadata:
15-
name: mysql.blog
15+
name: mysql-blog
1616
namespace: blog-namespace
1717
spec:
1818
clusterIP: None # Headless for StatefulSet
@@ -30,7 +30,7 @@ metadata:
3030
name: mysql
3131
namespace: blog-namespace
3232
spec:
33-
serviceName: mysql.blog # <-- IMPORTANT (matches service)
33+
serviceName: mysql-blog # <-- IMPORTANT (matches service)
3434
replicas: 1
3535
selector:
3636
matchLabels:
@@ -43,7 +43,8 @@ spec:
4343
spec:
4444
containers:
4545
- name: mysql
46-
image: mysql:8
46+
# image: mysql:8
47+
image: krishna2808/mysql-blog:V1
4748
env:
4849
- name: MYSQL_ROOT_PASSWORD
4950
value: "password"
@@ -89,7 +90,7 @@ spec:
8990
- name: DEBUG
9091
value: "True"
9192
- name: MYSQL_HOST
92-
value: mysql.blog
93+
value: mysql-blog
9394
- name: MYSQL_NAME
9495
value: blog
9596
- name: MYSQL_USER

docker-compose.yml

Lines changed: 26 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ services:
77
restart: unless-stopped
88
container_name: backend-blog
99
# This is for pulling image from docker hub
10-
# image : krishna2808/backend-blog:V1
10+
image : krishna2808/backend-blog:V1
1111
# build is take the context and dockerfile location
12-
build:
13-
context: .
14-
dockerfile: Dockerfiles/Dockerfile_backend
12+
# build:
13+
# context: .
14+
# dockerfile: Dockerfiles/Dockerfile_backend
1515

1616
volumes:
1717
- backend_container_data:/app/backend/
@@ -32,18 +32,19 @@ services:
3232

3333

3434
frontend_blog_sv:
35-
container_name: frontend-blog
35+
container_name: frontend-blog
36+
image : krishna2808/frontend-blog:V1
3637

37-
build:
38-
context: .
39-
dockerfile: Dockerfiles/Dockerfile_frontend
38+
# build:
39+
# context: .
40+
# dockerfile: Dockerfiles/Dockerfile_frontend
4041

41-
ports:
42-
- "3000:3000"
43-
volumes:
44-
- frontend_container_data:/app/frontend/
45-
stdin_open: true
46-
tty: true
42+
ports:
43+
- "3000:3000"
44+
volumes:
45+
- frontend_container_data:/app/frontend/
46+
stdin_open: true
47+
tty: true
4748

4849

4950
# redis_blog:
@@ -54,7 +55,8 @@ services:
5455
# - 6379
5556

5657
mysql_blog_sv:
57-
image: mysql:8
58+
# image: mysql:8
59+
image: krishna2808/mysql-blog:V1
5860
container_name: mysql-blog
5961
environment:
6062
MYSQL_ROOT_PASSWORD: password
@@ -67,14 +69,15 @@ services:
6769

6870

6971
nginx_blog_sv:
70-
image: nginx:alpine
71-
container_name: nginx-blog
72-
build: nginx/
73-
ports:
74-
- 80:80
75-
- 443:443
76-
depends_on:
77-
- backend_blog_sv
72+
# image: nginx:alpine
73+
image: krishna2808/nginx-blog:V1
74+
container_name: nginx-blog
75+
build: nginx/
76+
ports:
77+
- 80:80
78+
- 443:443
79+
depends_on:
80+
- backend_blog_sv
7881

7982

8083
volumes:

0 commit comments

Comments
 (0)