Skip to content

Commit

Permalink
Merge pull request #60 from MarcusDunn/Trigger
Browse files Browse the repository at this point in the history
Trigger and Transaction Implementation
  • Loading branch information
peterrwilson99 authored Mar 8, 2023
2 parents 5e2e28c + e22f8f8 commit d9ad06f
Show file tree
Hide file tree
Showing 197 changed files with 7,070 additions and 348 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/audit-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
on:
release:
types: [published]

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

name: Publish Audit Server Docker image

jobs:
push_to_registry:
name: Push Docker image to GitHub Packages
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Check out the repo
uses: actions/checkout@v3
- name: PrepareReg Names
run: |
echo IMAGE_REPOSITORY=$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV
- name: Log in to GitHub Docker Registry
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
with:
registry: docker.pkg.github.com
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push Docker image
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
with:
context: audit
push: true
tags: |
docker.pkg.github.com/${{ env.IMAGE_REPOSITORY }}/audit:${{ github.sha }}
docker.pkg.github.com/${{ env.IMAGE_REPOSITORY }}/audit:${{ github.event.release.tag_name }}
docker.pkg.github.com/${{ env.IMAGE_REPOSITORY }}/audit:latest
40 changes: 40 additions & 0 deletions .github/workflows/transaction-release .yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
on:
release:
types: [published]

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

name: Publish Transaction Server Docker image

jobs:
push_to_registry:
name: Push Docker image to GitHub Packages
runs-on: ubuntu-latest
permissions:
packages: write
contents: read
steps:
- name: Check out the repo
uses: actions/checkout@v3
- name: PrepareReg Names
run: |
echo IMAGE_REPOSITORY=$(echo ${{ github.repository }} | tr '[:upper:]' '[:lower:]') >> $GITHUB_ENV
- name: Log in to GitHub Docker Registry
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
with:
registry: docker.pkg.github.com
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push Docker image
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
with:
context: transaction
push: true
tags: |
docker.pkg.github.com/${{ env.IMAGE_REPOSITORY }}/transaction:${{ github.sha }}
docker.pkg.github.com/${{ env.IMAGE_REPOSITORY }}/transaction:${{ github.event.release.tag_name }}
docker.pkg.github.com/${{ env.IMAGE_REPOSITORY }}/transaction:latest
4 changes: 1 addition & 3 deletions audit/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,7 @@ COPY . .

RUN npm install
RUN npx prisma generate
RUN npm run build


EXPOSE 50051

CMD ["npm", "run", "docker"]
CMD npx prisma db push && npm run dev
4 changes: 0 additions & 4 deletions audit/cmd.sh

This file was deleted.

12 changes: 6 additions & 6 deletions audit/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ version: "3.9"
services:
postgres:
image: postgres:latest
container_name: logDB
container_name: auditDB
hostname: postgres
ports:
- 5432:5432
Expand All @@ -11,11 +11,11 @@ services:
POSTGRES_PASSWORD: "postgrespw"
POSTGRES_DB: "devdb"
volumes:
- logDB-data:/var/lib/postgresql/data
- auditDB-data:/var/lib/postgresql/data
restart: unless-stopped
transactionserver:
image: transactionserver
container_name: transactionService
auditserver:
image: auditserver
container_name: auditService
build: "./"
ports:
- 50051:50051
Expand All @@ -26,4 +26,4 @@ services:
restart: unless-stopped

volumes:
logDB-data:
auditDB-data:
Loading

0 comments on commit d9ad06f

Please sign in to comment.