-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #88 from coolworld2049/microservices-k8s
Microservices k8s
- Loading branch information
Showing
124 changed files
with
5,472 additions
and
269,059 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
PROJECT_NAME=fastapi-ecommerce | ||
STAGE=prod | ||
|
||
DOCKER_USER=coolworldocker | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,59 @@ | ||
#file: noinspection YAMLSchemaValidation | ||
name: Deploy | ||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
jobs: | ||
test: | ||
name: Test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Build images and publish to registry | ||
run: | | ||
echo "${{ secrets.ENV_FILE }}" > .env | ||
echo "${{ secrets.AUTH_SERVICE_ENV_FILE }}" > src/auth_service/.env.prod | ||
echo "${{ secrets.STORE_SERVICE_ENV_FILE }}" > src/store_service/.env.prod | ||
export STAGE=test | ||
cd hack | ||
bash cpenv.sh | ||
bash artifact.sh | ||
bash start.sh | ||
cd .. | ||
build: | ||
name: Production Deployment | ||
needs: [ test ] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: scp-action | ||
uses: appleboy/scp-action@master | ||
with: | ||
host: ${{ secrets.SERVER_IP }} | ||
username: ${{ secrets.SERVER_USERNAME }} | ||
port: ${{ secrets.SSH_PORT }} | ||
password: ${{ secrets.SERVER_PASSWORD }} | ||
source: "." | ||
target: "/root/fastapi_ecommerce/" | ||
|
||
- name: source_db.sh | ||
uses: appleboy/ssh-action@master | ||
with: | ||
host: ${{ secrets.SERVER_IP }} | ||
username: ${{ secrets.SERVER_USERNAME }} | ||
port: ${{ secrets.SSH_PORT }} | ||
password: ${{ secrets.SERVER_PASSWORD }} | ||
script: | | ||
cd /root/fastapi_ecommerce/ | ||
echo "${{ secrets.ENV_FILE }}" > .env | ||
echo "${{ secrets.AUTH_SERVICE_ENV_FILE }}" > src/auth_service/.env.prod | ||
echo "${{ secrets.STORE_SERVICE_ENV_FILE }}" > src/store_service/.env.prod | ||
cd hack | ||
bash cpenv.sh | ||
bash restart.sh | ||
##file: noinspection YAMLSchemaValidation | ||
#name: Deploy | ||
#on: | ||
# pull_request: | ||
# branches: | ||
# - master | ||
#jobs: | ||
# test: | ||
# name: Test | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - uses: actions/checkout@v3 | ||
# - name: Build images and publish to registry | ||
# run: | | ||
# echo "${{ secrets.ENV_FILE }}" > .env | ||
# echo "${{ secrets.AUTH_SERVICE_ENV_FILE }}" > src/auth_service/.env.prod | ||
# echo "${{ secrets.STORE_SERVICE_ENV_FILE }}" > src/store_service/.env.prod | ||
# export STAGE=test | ||
# cd hack | ||
# bash convert.sh | ||
# source ../.env | ||
# bash artifact.sh -u $DOCKER_USER -p $DOCKER_PASSWORD --docker | ||
# bash artifact.sh -u $PYPI_USER -p $PYPI_PASSWORD --pypi | ||
# cd ../deployment/compose/ | ||
# bash start.sh | ||
# cd ../../.. | ||
# build: | ||
# name: Production Deployment | ||
# needs: [ test ] | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - uses: actions/checkout@v3 | ||
# - name: scp-action | ||
# uses: appleboy/scp-action@master | ||
# with: | ||
# host: ${{ secrets.SERVER_IP }} | ||
# username: ${{ secrets.SERVER_USERNAME }} | ||
# port: ${{ secrets.SSH_PORT }} | ||
# password: ${{ secrets.SERVER_PASSWORD }} | ||
# source: "." | ||
# target: "/root/fastapi_ecommerce/" | ||
# | ||
# - name: start | ||
# uses: appleboy/ssh-action@master | ||
# with: | ||
# host: ${{ secrets.SERVER_IP }} | ||
# username: ${{ secrets.SERVER_USERNAME }} | ||
# port: ${{ secrets.SSH_PORT }} | ||
# password: ${{ secrets.SERVER_PASSWORD }} | ||
# script: | | ||
# cd /root/fastapi_ecommerce/ | ||
# echo "${{ secrets.ENV_FILE }}" > .env | ||
# echo "${{ secrets.AUTH_SERVICE_ENV_FILE }}" > src/auth_service/.env.prod | ||
# echo "${{ secrets.STORE_SERVICE_ENV_FILE }}" > src/store_service/.env.prod | ||
# cd hack | ||
# bash convert.sh | ||
# cd ../deployment/compose/ | ||
# bash restart.sh | ||
# cd ../../.. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.