Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
63b42f0
first commit
sarveshchitkeshiwar280 Mar 12, 2026
62ece48
Add server-side source code and test resources
sarveshchitkeshiwar280 Mar 12, 2026
68de65f
Clean up build artifacts and add .gitignore
sarveshchitkeshiwar280 Mar 12, 2026
726934b
Add Docker setup, API module, and configuration updates
sarveshchitkeshiwar280 Mar 13, 2026
c4cc5e0
Add CI/CD pipeline
sarveshchitkeshiwar280 Mar 16, 2026
246b96b
Move workflow to correct location
sarveshchitkeshiwar280 Mar 16, 2026
b3fbb50
Trigger workflow
sarveshchitkeshiwar280 Mar 16, 2026
fcd9e61
Fix client config, add job manifest, and move workflow to correct loc…
sarveshchitkeshiwar280 Mar 16, 2026
149f418
Fix workflow YAML syntax
sarveshchitkeshiwar280 Mar 16, 2026
4035647
Fix workflow YAML syntax and use correct GitHub context
sarveshchitkeshiwar280 Mar 16, 2026
d043de6
Fix workflow syntax with correct GitHub expressions
sarveshchitkeshiwar280 Mar 16, 2026
0771072
Add feature/grpc to push triggers and remove old workflow
sarveshchitkeshiwar280 Mar 16, 2026
62acc09
Fix workflow tags syntax and add feature/grpc to push branches
sarveshchitkeshiwar280 Mar 16, 2026
41ecee8
Fix workflow indentation and tags syntax
sarveshchitkeshiwar280 Mar 16, 2026
9a1f5a5
Final workflow fix: remove dashes, add manual trigger
sarveshchitkeshiwar280 Mar 16, 2026
9c63b73
Trigger workflow
sarveshchitkeshiwar280 Mar 16, 2026
7e85d79
Force update workflow file with correct content
sarveshchitkeshiwar280 Mar 16, 2026
8eca3ab
Final fix: correct placeholders and registry spelling
sarveshchitkeshiwar280 Mar 16, 2026
ff1aea3
Final workflow fix with correct syntax
sarveshchitkeshiwar280 Mar 16, 2026
862ae4f
Final fix: correct syntax and registry spelling
sarveshchitkeshiwar280 Mar 16, 2026
13f23bd
Fix Dockerfile paths: remove service name prefix and client lines fro…
sarveshchitkeshiwar280 Mar 16, 2026
4d13434
Fix client logging config and port
sarveshchitkeshiwar280 Mar 17, 2026
dcd217d
Add API JAR to client lib
sarveshchitkeshiwar280 Mar 17, 2026
b13a339
Fix server Dockerfile: correct mvn command
sarveshchitkeshiwar280 Mar 17, 2026
ffa7399
Separate client/server jobs, fix server context and add API JAR copy
sarveshchitkeshiwar280 Mar 17, 2026
c8a23ff
Separate client/server jobs, fix server context and add API JAR copy
sarveshchitkeshiwar280 Mar 17, 2026
2b661e7
Use CR_PAT for GHCR push
sarveshchitkeshiwar280 Mar 17, 2026
9619a7f
Fix server Dockerfile paths for root context
sarveshchitkeshiwar280 Mar 17, 2026
de73d03
Updated Dockerfile for gRPC streaming POC
sarveshchitkeshiwar280 Mar 24, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .github/workflows/ci-cd.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: CI/CD

on:
workflow_dispatch:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
build-client:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.CR_PAT }}
- name: Build and push client
uses: docker/build-push-action@v5
with:
context: ./stock-trading-client
file: ./stock-trading-client/Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: |
ghcr.io/${{ github.repository_owner }}/stock-trading-client:${{ github.sha }}
ghcr.io/${{ github.repository_owner }}/stock-trading-client:latest

build-server:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.CR_PAT }}
- name: Build and push server
uses: docker/build-push-action@v5
with:
context: . # root context to access client/lib
file: ./stock-trading-server/Dockerfile
push: ${{ github.event_name != 'pull_request' }}
tags: |
ghcr.io/${{ github.repository_owner }}/stock-trading-server:${{ github.sha }}
ghcr.io/${{ github.repository_owner }}/stock-trading-server:latest
33 changes: 33 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# IntelliJ IDEA
.idea/
*.iml

# Build artifacts
target/
*.jar
*.war
*.ear

# Logs
*.log
compile.log

# Backups
*.bak
*.backup
*.txt.bak
*.properties.bak
*.json.bak

# OS metadata
.DS_Store
Thumbs.db

# Maven wrapper (keep mvnw, ignore the jar)
.mvn/wrapper/maven-wrapper.jar

# Protoc plugins (downloaded by Maven)
**/protoc-plugins/

# PowerShell scripts
*.ps1
191 changes: 0 additions & 191 deletions bulk-order.html

This file was deleted.

42 changes: 42 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
version: '3.8'

services:
server:
build:
context: .
dockerfile: stock-trading-server/Dockerfile
container_name: stock-server
ports:
- "6565:6565"
- "8081:8081"
environment:
- SERVER_PORT=8081
- GRPC_SERVER_PORT=6565
- GRPC_REFLECTION_ENABLED=false
- MANAGEMENT_INCLUDE=health,info,metrics
- HEALTH_SHOW_DETAILS=always
volumes:
- ~/.m2/repository:/root/.m2/repository
networks:
- grpc-net

client:
build:
context: .
dockerfile: stock-trading-client/Dockerfile
container_name: stock-client
depends_on:
- server
ports:
- "8082:8082"
environment:
- GRPC_SERVER_ADDRESS=static://server:6565
- LOG_LEVEL_GRPC=INFO
volumes:
- ~/.m2/repository:/root/.m2/repository
networks:
- grpc-net

networks:
grpc-net:
driver: bridge
41 changes: 41 additions & 0 deletions k8s/client-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: stock-trading-client
spec:
replicas: 1
selector:
matchLabels:
app: stock-trading-client
template:
metadata:
labels:
app: stock-trading-client
spec:
containers:
- name: client
image: ghcr.io/sarveshchitkeshiwar280/stock-trading-client:latest
ports:
- containerPort: 8082
name: http
env:
- name: GRPC_SERVER_ADDRESS
value: "static://stock-trading-server:6565"
- name: LOG_LEVEL_GRPC
value: "INFO"
livenessProbe:
httpGet:
path: /actuator/health
port: 8082
initialDelaySeconds: 30
readinessProbe:
httpGet:
path: /actuator/health
port: 8082
resources:
requests:
memory: "256Mi"
cpu: "250m"
limits:
memory: "512Mi"
cpu: "500m"
11 changes: 11 additions & 0 deletions k8s/client-service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
apiVersion: v1
kind: Service
metadata:
name: stock-trading-client
spec:
type: ClusterIP
selector:
app: stock-trading-client
ports:
- port: 8082
targetPort: 8082
Loading