Skip to content

Commit

Permalink
Merge branch 'online-dep'
Browse files Browse the repository at this point in the history
  • Loading branch information
Setmaster committed Jun 14, 2024
2 parents 565f2e3 + f9d65a3 commit 5f6eabd
Show file tree
Hide file tree
Showing 9 changed files with 223 additions and 30 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/deploy-auction.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: deploy-auction

on:
workflow_dispatch:
push:
branches: [ master ]
paths:
- 'server/AuctionService/**'
pull_request:
branches: [ master ]
paths:
- 'server/AuctionService/**'

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3
- name: Login to docker hub
uses: docker/login-action@v3
with:
username: ${{secrets.DOCKERHUB_USERNAME}}
password: ${{secrets.DOCKERHUB_PASSWORD}}
- name: Build and push the Docker image
uses: docker/build-push-action@v5
with:
context: .
file: server/AuctionService/DockerFile
push: true
tags: 7devio/shift-swap-auction-service:latest
32 changes: 32 additions & 0 deletions .github/workflows/deploy-bidding.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: deploy-bidding

on:
workflow_dispatch:
push:
branches: [ master ]
paths:
- 'server/BiddingService/**'
pull_request:
branches: [ master ]
paths:
- 'server/BiddingService/**'

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3
- name: Login to docker hub
uses: docker/login-action@v3
with:
username: ${{secrets.DOCKERHUB_USERNAME}}
password: ${{secrets.DOCKERHUB_PASSWORD}}
- name: Build and push the Docker image
uses: docker/build-push-action@v5
with:
context: .
file: server/BiddingService/DockerFile
push: true
tags: 7devio/shift-swap-bidding-service:latest
32 changes: 32 additions & 0 deletions .github/workflows/deploy-gateway.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: deploy-gateway

on:
workflow_dispatch:
push:
branches: [ master ]
paths:
- 'server/GatewayService/**'
pull_request:
branches: [ master ]
paths:
- 'server/GatewayService/**'

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3
- name: Login to docker hub
uses: docker/login-action@v3
with:
username: ${{secrets.DOCKERHUB_USERNAME}}
password: ${{secrets.DOCKERHUB_PASSWORD}}
- name: Build and push the Docker image
uses: docker/build-push-action@v5
with:
context: .
file: server/GatewayService/DockerFile
push: true
tags: 7devio/shift-swap-gateway-service:latest
4 changes: 1 addition & 3 deletions .github/workflows/deploy-identity.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,7 @@ on:
- 'server/IdentityService/**'

jobs:

build:

runs-on: ubuntu-latest

steps:
Expand All @@ -31,4 +29,4 @@ jobs:
context: .
file: server/IdentityService/DockerFile
push: true
tags: 7devio/identity-service:latest
tags: 7devio/shift-swap-identity-service:latest
32 changes: 32 additions & 0 deletions .github/workflows/deploy-notifications.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: deploy-notifications

on:
workflow_dispatch:
push:
branches: [ master ]
paths:
- 'server/NotificationsService/**'
pull_request:
branches: [ master ]
paths:
- 'server/NotificationsService/**'

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3
- name: Login to docker hub
uses: docker/login-action@v3
with:
username: ${{secrets.DOCKERHUB_USERNAME}}
password: ${{secrets.DOCKERHUB_PASSWORD}}
- name: Build and push the Docker image
uses: docker/build-push-action@v5
with:
context: .
file: server/NotificationsService/DockerFile
push: true
tags: 7devio/shift-swap-notifications-service:latest
32 changes: 32 additions & 0 deletions .github/workflows/deploy-search.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: deploy-search

on:
workflow_dispatch:
push:
branches: [ master ]
paths:
- 'server/SearchService/**'
pull_request:
branches: [ master ]
paths:
- 'server/SearchService/**'

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3
- name: Login to docker hub
uses: docker/login-action@v3
with:
username: ${{secrets.DOCKERHUB_USERNAME}}
password: ${{secrets.DOCKERHUB_PASSWORD}}
- name: Build and push the Docker image
uses: docker/build-push-action@v5
with:
context: .
file: server/SearchService/DockerFile
push: true
tags: 7devio/shift-swap-search-service:latest
35 changes: 35 additions & 0 deletions .github/workflows/deploy-web-app.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: deploy-webapp

on:
workflow_dispatch:
push:
branches: [ master ]
paths:
- 'client/shift-swapper-web-app/**'
pull_request:
branches: [ master ]
paths:
- 'client/shift-swapper-web-app/**'

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3
- name: Login to docker hub
uses: docker/login-action@v3
with:
username: ${{secrets.DOCKERHUB_USERNAME}}
password: ${{secrets.DOCKERHUB_PASSWORD}}
- name: Build and push the Docker image
uses: docker/build-push-action@v5
with:
context: .
file: client/shift-swapper-web-app/DockerFile
push: true
tags: 7devio/web-app:latest
env:
AWS_ACCESS_KEY_ID: ${{secrets.AWS_ACCESS_KEY_ID}}
AWS_SECRET_ACCESS_KEY: ${{secrets.AWS_SECRET_ACCESS_KEY}}
44 changes: 22 additions & 22 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ services:
- 15672:15672
networks:
custom:
auction-service:
image: 7devio/auction-service:latest
shift-swap-auction-service:
image: 7devio/shift-swap-auction-service:latest
build:
context: .
dockerfile: server/AuctionService/DockerFile
Expand All @@ -44,7 +44,7 @@ services:
- ASPNETCORE_URLS=http://+7777
- RabbitMq__Host=rabbitmq
- ConnectionStrings__DefaultConnection=Server=postgres:5432;User Id=postgres;Password=postgres;Database=auctions
- IdentityServiceUrl=http://identity-service
- IdentityServiceUrl=http://shift-swap-identity-service
- Kestrel__Endpoints__Grpc__Protocols=Http2
- Kestrel__Endpoints__Grpc__Url=http://+:7777
- Kestrel__Endpoints__WebApi__Protocols=Http1
Expand All @@ -57,8 +57,8 @@ services:
depends_on:
- postgres
- rabbitmq
search-service:
image: 7devio/search-service:latest
shift-swap-search-service:
image: 7devio/shift-swap-search-service:latest
build:
context: .
dockerfile: server/SearchService/DockerFile
Expand All @@ -67,16 +67,16 @@ services:
- ASPNETCORE_URLS=http://+:80
- RabbitMq__Host=rabbitmq
- ConnectionStrings__MongoDbConnection=mongodb://root:root@mongodb
- AuctionServiceUrl=http://auction-service
- AuctionServiceUrl=http://shift-swap-auction-service
ports:
- 7002:80
networks:
custom:
depends_on:
- mongodb
- rabbitmq
identity-service:
image: 7devio/identity-service:latest
shift-swap-identity-service:
image: 7devio/shift-swap-identity-service:latest
build:
context: .
dockerfile: server/IdentityService/DockerFile
Expand All @@ -91,8 +91,8 @@ services:
ipv4_address: 10.5.0.200
depends_on:
- postgres
gateway-service:
image: 7devio/gateway-service:latest
shift-swap-gateway-service:
image: 7devio/shift-swap-gateway-service:latest
build:
context: .
dockerfile: server/GatewayService/DockerFile
Expand All @@ -103,8 +103,8 @@ services:
- ClientApp=https://app.shiftswap.com
networks:
custom:
bidding-service:
image: 7devio/bidding-service:latest
shift-swap-bidding-service:
image: 7devio/shift-swap-bidding-service:latest
build:
context: .
dockerfile: server/BiddingService/DockerFile
Expand All @@ -113,17 +113,17 @@ services:
- ASPNETCORE_URLS=http://+:80
- RabbitMq__Host=rabbitmq
- ConnectionStrings__BidDbConnection=mongodb://root:root@mongodb
- IdentityServiceUrl=http://identity-service
- GrpcAuction=http://auction-service:7777
- IdentityServiceUrl=http://shift-swap-identity-service
- GrpcAuction=http://shift-swap-auction-service:7777
ports:
- 7003:80
networks:
custom:
depends_on:
- mongodb
- rabbitmq
notifications-service:
image: 7devio/notifications-service:latest
shift-swap-notifications-service:
image: 7devio/shift-swap-notifications-service:latest
build:
context: .
dockerfile: server/NotificationsService/DockerFile
Expand Down Expand Up @@ -154,9 +154,9 @@ services:
- NEXTAUTH_SECRET=somethingreallyreallysecret
- NEXTAUTH_URL=http://app.shiftswap.com
- NEXTAUTH_URL_INTERNAL=http://web-app:3000
- API_URL=http://gateway-service/
- API_URL=http://shift-swap-gateway-service/
- ID_URL=http://id.shiftswap.com
- NEXT_PUBLIC_NOTIFY_URL=http://gateway-service/notifications
- NEXT_PUBLIC_NOTIFY_URL=http://shift-swap-gateway-service/notifications
- VIRTUAL_HOST=app.shiftswap.com
- VIRTUAL_PORT=3000
nginx-proxy:
Expand All @@ -165,10 +165,10 @@ services:
- 80:80
- 443:443
networks:
custom:
custom:
volumes:
- /var/run/docker.sock:/tmp/docker.sock:ro
- ./devcerts:/etc/nginx/certs
- /var/run/docker.sock:/tmp/docker.sock:ro
- ./devcerts:/etc/nginx/certs
volumes:
pgdata:
mongodata:
mongodata:
10 changes: 5 additions & 5 deletions server/GatewayService/appsettings.Docker.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,34 +5,34 @@
"Microsoft.AspNetCore": "Information"
}
},
"IdentityServiceUrl": "http://identity-service",
"IdentityServiceUrl": "http://shift-swap-identity-service",
"ReverseProxy": {
"Clusters": {
"auctions": {
"Destinations": {
"auctionApi": {
"Address": "http://auction-service"
"Address": "http://shift-swap-auction-service"
}
}
},
"search": {
"Destinations": {
"searchApi": {
"Address": "http://search-service"
"Address": "http://shift-swap-search-service"
}
}
},
"bids": {
"Destinations": {
"bidApi": {
"Address": "http://bidding-service"
"Address": "http://shift-swap-bidding-service"
}
}
},
"notifications": {
"Destinations": {
"notifyApi": {
"Address": "http://notifications-service"
"Address": "http://shift-swap-notifications-service"
}
}
}
Expand Down

0 comments on commit 5f6eabd

Please sign in to comment.