Skip to content

Commit

Permalink
add mainnet env
Browse files Browse the repository at this point in the history
  • Loading branch information
EC2 Default User committed Oct 6, 2023
1 parent df7aa30 commit a457495
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 20 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/api-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
build-push-docker-image:
runs-on: ubuntu-latest
environment:
name: testnet
name: mainnet
steps:
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
Expand Down Expand Up @@ -41,7 +41,7 @@ jobs:
uses: docker/build-push-action@v4
with:
push: true
tags: ${{ vars.API_TESTNET_TAG }}
tags: ${{ vars.API_MAINNET_TAG }}
#tags: 121427815363.dkr.ecr.ap-southeast-1.amazonaws.com/bworks:api-testnet
#tags: jackchuong/itl:bworks-api-testnet
context: .
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/api-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
restart-api-service:
runs-on: ubuntu-latest
environment:
name: testnet
name: mainnet
steps:
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
Expand Down Expand Up @@ -62,7 +62,7 @@ jobs:
docker-compose -f docker-compose.yml stop api
docker-compose -f docker-compose.yml rm -f api
cat docker-compose.template.yml > docker-compose.yml
sed -i "s|API_TESTNET_TAG|${{ vars.API_TESTNET_TAG }}|g" docker-compose.yml
sed -i "s|API_MAINNET_TAG|${{ vars.API_MAINNET_TAG }}|g" docker-compose.yml
#docker rmi -f 121427815363.dkr.ecr.ap-southeast-1.amazonaws.com/bworks:api-testnet
#docker rmi -f jackchuong/itl:bworks-api-testnet
aws ecr get-login-password --region ap-southeast-1 | docker login --username AWS --password-stdin 121427815363.dkr.ecr.ap-southeast-1.amazonaws.com/bworks
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/frontend-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
build-push-docker-image:
runs-on: ubuntu-latest
environment:
name: testnet
name: mainnet
steps:
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
Expand Down Expand Up @@ -53,7 +53,7 @@ jobs:
uses: docker/build-push-action@v4
with:
push: true
tags: ${{ vars.FRONTEND_TESTNET_TAG }}
tags: ${{ vars.FRONTEND_MAINNET_TAG }}
#tags: 121427815363.dkr.ecr.ap-southeast-1.amazonaws.com/bworks:frontend-testnet
#tags: jackchuong/itl:bworks-frontend-testnet
context: .
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/frontend-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
restart-api-service:
runs-on: ubuntu-latest
environment:
name: testnet
name: mainnet
steps:
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
Expand All @@ -22,7 +22,7 @@ jobs:
docker-compose -f docker-compose.yml stop nginx
docker-compose -f docker-compose.yml rm -f nginx
cat docker-compose.template.yml > docker-compose.yml
sed -i "s|FRONTEND_TESTNET_TAG|${{ vars.FRONTEND_TESTNET_TAG }}|g" docker-compose.yml
sed -i "s|FRONTEND_MAINNET_TAG|${{ vars.FRONTEND_MAINNET_TAG }}|g" docker-compose.yml
#docker rmi -f 121427815363.dkr.ecr.ap-southeast-1.amazonaws.com/bworks:frontend-testnet
#docker rmi -f jackchuong/itl:bworks-frontend-testnet
aws ecr get-login-password --region ap-southeast-1 | docker login --username AWS --password-stdin 121427815363.dkr.ecr.ap-southeast-1.amazonaws.com/bworks
Expand Down
4 changes: 2 additions & 2 deletions docker-configs/docker-compose.template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ services:
- bworksnet

nginx:
image: FRONTEND_TESTNET_TAG
image: FRONTEND_MAINNET_TAG
#image: 121427815363.dkr.ecr.ap-southeast-1.amazonaws.com/bworks:frontend-testnet
#image: jackchuong/itl:bworks-frontend-testnet
container_name: nginx
Expand Down Expand Up @@ -68,7 +68,7 @@ services:
- bworksnet

api:
image: API_TESTNET_TAG
image: API_MAINNET_TAG
#image: 121427815363.dkr.ecr.ap-southeast-1.amazonaws.com/bworks:api-testnet
#image: jackchuong/itl:bworks-api-testnet
container_name: api
Expand Down
20 changes: 10 additions & 10 deletions docker-configs/nginx/conf.d/custom.conf
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
server {
listen 80;

server_name dev.bworks.app;
server_name bworks.app;
server_tokens off;

location /.well-known/acme-challenge/ {
root /var/www/certbot;
}

location / {
return 301 https://dev.bworks.app$request_uri;
return 301 https://bworks.app$request_uri;
}
}

server {
listen 443 ssl;

server_name dev.bworks.app;
server_name bworks.app;

ssl_certificate /etc/nginx/ssl/live/dev.bworks.app/fullchain.pem;
ssl_certificate_key /etc/nginx/ssl/live/dev.bworks.app/privkey.pem;
ssl_certificate /etc/nginx/ssl/live/bworks.app-0001/fullchain.pem;
ssl_certificate_key /etc/nginx/ssl/live/bworks.app-0001/privkey.pem;

location /cms {
root /var/www/cms; #run cms app
Expand Down Expand Up @@ -60,25 +60,25 @@ server {
server {
listen 80;

server_name dev.www.bworks.app;
server_name www.bworks.app;
server_tokens off;

location /.well-known/acme-challenge/ {
root /var/www/certbot;
}

location / {
return 301 https://dev.www.bworks.app$request_uri;
return 301 https://www.bworks.app$request_uri;
}
}

server {
listen 443 ssl;

server_name dev.www.bworks.app;
server_name www.bworks.app;

ssl_certificate /etc/nginx/ssl/live/dev.www.bworks.app/fullchain.pem;
ssl_certificate_key /etc/nginx/ssl/live/dev.www.bworks.app/privkey.pem;
ssl_certificate /etc/nginx/ssl/live/www.bworks.app/fullchain.pem;
ssl_certificate_key /etc/nginx/ssl/live/www.bworks.app/privkey.pem;

location / {
proxy_pass http://homepage:8000;
Expand Down

0 comments on commit a457495

Please sign in to comment.