Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
Okm165 committed Jul 5, 2024
1 parent 0b66a5c commit 54dc1be
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 4 deletions.
1 change: 1 addition & 0 deletions dashboard/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
# misc
.DS_Store
*.pem
.env

# debug
npm-debug.log*
Expand Down
4 changes: 2 additions & 2 deletions dashboard/src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export default function Home() {
let subscriber: EventSource | null = null

try {
const response = await fetch("http://localhost:3010/delegate", {
const response = await fetch(`${process.env.NEXT_PUBLIC_API_URL}/delegate`, {
method: "POST",
headers: {
"Content-Type": "application/json",
Expand All @@ -126,7 +126,7 @@ export default function Home() {
setIsProcessing(data.job_hash);

subscriber = subscribeEvents(
"http://localhost:3010/job_events",
`${process.env.NEXT_PUBLIC_API_URL}/job_events`,
`job_hash=${data.job_hash.toString()}`,
(event) => {
let job_event = JobEventsResponse.parse(event);
Expand Down
21 changes: 19 additions & 2 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,30 @@ services:
limits:
cpus: '10'
memory: '10G'
ports:
- "3010:3010/tcp"
environment:
- RUST_LOG=info
networks:
- zetina-network

zetina-delegator-dashboard:
build:
context: dashboard
dockerfile: dashboard.dockerfile
image: zetina-delegator-dashboard
depends_on:
- zetina-delegator
deploy:
resources:
limits:
cpus: '1'
memory: '1G'
ports:
- "3000:3000/tcp"
environment:
- NEXT_PUBLIC_API_URL=http://zetina-delegator:3010
networks:
- zetina-network

zetina-executor:
build:
dockerfile: executor.dockerfile
Expand Down

0 comments on commit 54dc1be

Please sign in to comment.