Skip to content

Commit 2abddee

Browse files
committed
[dev] set deploy&service with multiple server
1 parent a42fb54 commit 2abddee

25 files changed

+222
-349
lines changed

.github/workflows/deploy.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ jobs:
8989
run: ./gradlew build --daemon --parallel -Pversion=${NEW_VERSION}
9090

9191
- name: Build docker images
92-
run: docker-compose -f docker-compose-only-chat.yaml build
92+
run: docker-compose -f docker-compose-prod.yaml build
9393

9494
- name: Configure AWS credentials
9595
uses: aws-actions/configure-aws-credentials@v1
@@ -127,7 +127,7 @@ jobs:
127127
git reset --hard
128128
git pull origin main
129129
cd k8s/onlychat/deployment
130-
sh write_image_to_deploy.sh ${{ env.ECR_URL }} ap-northeast-2 ${NEW_VERSION}
130+
sh write_image_to_deploy.sh ${{ env.ECR_URL }} ap-east-2 ${NEW_VERSION}
131131
kubectl apply -f ./volume/
132132
kubectl apply -f ./namespace/
133133
kubectl apply -f ./service/

k8s/all/deploy/chat-db-deployment.yaml

Lines changed: 0 additions & 57 deletions
This file was deleted.

k8s/all/deploy/customer-db-deployment.yaml

Lines changed: 0 additions & 54 deletions
This file was deleted.

k8s/all/deploy/discovery-server-deployment.yaml

Lines changed: 0 additions & 40 deletions
This file was deleted.

k8s/all/deploy/user-db-deployment.yaml

Lines changed: 0 additions & 54 deletions
This file was deleted.

k8s/all/deploy/zookeeper-deployment.yaml

Lines changed: 0 additions & 36 deletions
This file was deleted.

k8s/all/service/discovery-server-service.yaml

Lines changed: 0 additions & 20 deletions
This file was deleted.

k8s/all/service/kafka1-service.yaml

Lines changed: 0 additions & 20 deletions
This file was deleted.
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: api-server-deployment
5+
spec:
6+
replicas: 1
7+
selector:
8+
matchLabels:
9+
app: api-server-service
10+
template:
11+
metadata:
12+
labels:
13+
app: api-server
14+
spec:
15+
containers:
16+
- env:
17+
- name: SERVER_PORT
18+
value: "8000"
19+
- name: SPRING_CLOUD_CONFIG_URI
20+
value: http://43.202.52.177:8888
21+
- name: SPRING_MAIN_web-application-type
22+
value: reactive
23+
- name: SPRING_RABBITMQ_HOST
24+
value: rabbitmq
25+
- name: eureka_client_service-url_defaultZone
26+
value: http://discovery-server-service:8761/eureka
27+
image: main-service_api-server:latest
28+
name: api-server
29+
ports:
30+
- port: 8000
31+
targetPort: 8000
32+
protocol: TCP
33+
restartPolicy: Always

k8s/onlychat/deployment/chatting-server-deployment.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
apiVersion: apps/v1
22
kind: Deployment
33
metadata:
4-
name: chatting-server
4+
name: chatting-server-deployment
55
spec:
66
replicas: 1
77
selector:
88
matchLabels:
9-
app: chatting-server
9+
app: chatting-server-service
1010
template:
1111
metadata:
1212
labels:
@@ -45,7 +45,7 @@ spec:
4545
image: main-service_chatting-server:latest
4646
name: chatting-server
4747
ports:
48-
- containerPort: 8030
49-
hostPort: 8030
48+
- port: 8030
49+
targetPort: 8030
5050
protocol: TCP
5151
restartPolicy: Always

0 commit comments

Comments
 (0)