Skip to content

Commit 4ccb3ef

Browse files
fix: update repo name
1 parent 9323f75 commit 4ccb3ef

File tree

2 files changed

+9
-7
lines changed

2 files changed

+9
-7
lines changed

.github/workflows/deploy_docker_aws.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
username: ${{ vars.AWS_EC2_USER }}
2525
key: ${{ secrets.AWS_EC2_PRIVATE_KEY }}
2626
source: "deployment/compose.aws.yml"
27-
target: /home/${{ vars.AWS_EC2_USER }}
27+
target: /home/${{ vars.AWS_EC2_USER }}/deployment
2828

2929
- name: SSH to VM and Create .env.prod
3030
uses: appleboy/[email protected]
@@ -33,7 +33,7 @@ jobs:
3333
username: ${{ vars.AWS_EC2_USER }}
3434
key: ${{ secrets.AWS_EC2_PRIVATE_KEY }}
3535
script: |
36-
rm .env.prod
36+
rm -f .env.prod
3737
touch .env.prod
3838
echo "CLIENT_HOST=client.${{ vars.EC2_PUBLIC_IP }}.nip.io" >> .env.prod
3939
echo "SERVER_HOST=api.${{ vars.EC2_PUBLIC_IP }}.nip.io" >> .env.prod
@@ -48,6 +48,8 @@ jobs:
4848
script: |
4949
echo "Debug: Listing directory contents..."
5050
ls -la /home/${{ vars.AWS_EC2_USER }}
51+
echo "Debug: Updating image names in compose file..."
52+
sed -i "s|ghcr.io/aet-devops25/w05-template|ghcr.io/${{ github.repository }}|g" /home/${{ vars.AWS_EC2_USER }}/deployment/compose.aws.yml
5153
echo "Debug: Checking compose file..."
5254
cat /home/${{ vars.AWS_EC2_USER }}/deployment/compose.aws.yml
5355
echo "Logging into Docker registry..."

deployment/compose.aws.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ services:
2323
- backend
2424

2525
gateway-service:
26-
image: ghcr.io/aet-devops25/w05-template/gateway:latest
26+
image: ghcr.io/${{ github.repository }}/gateway:latest
2727
container_name: gateway-service
2828
environment:
2929
- SPRING_PROFILES_ACTIVE=docker
@@ -42,7 +42,7 @@ services:
4242
- backend
4343

4444
chat-service:
45-
image: ghcr.io/aet-devops25/w05-template/chat:latest
45+
image: ghcr.io/${{ github.repository }}/chat:latest
4646
container_name: chat-service
4747
environment:
4848
- SPRING_PROFILES_ACTIVE=docker
@@ -57,7 +57,7 @@ services:
5757
- backend
5858

5959
matching-service:
60-
image: ghcr.io/aet-devops25/w05-template/matching:latest
60+
image: ghcr.io/${{ github.repository }}/matching:latest
6161
container_name: matching-service
6262
environment:
6363
- SPRING_PROFILES_ACTIVE=docker
@@ -72,7 +72,7 @@ services:
7272
- backend
7373

7474
user-service:
75-
image: ghcr.io/aet-devops25/w05-template/user:latest
75+
image: ghcr.io/${{ github.repository }}/user:latest
7676
container_name: user-service
7777
environment:
7878
- SPRING_PROFILES_ACTIVE=docker
@@ -87,7 +87,7 @@ services:
8787
- backend
8888

8989
client:
90-
image: ghcr.io/aet-devops25/w05-template/client:latest
90+
image: ghcr.io/${{ github.repository }}/client:latest
9191
environment:
9292
- PUBLIC_API_URL=${PUBLIC_API_URL}
9393
depends_on:

0 commit comments

Comments
 (0)