Skip to content

Commit

Permalink
Merge pull request #40 from MathisBurger/feature/runner-cmd
Browse files Browse the repository at this point in the history
[FIX] Fixed domain
  • Loading branch information
MathisBurger authored Oct 11, 2024
2 parents b09e600 + c5a7bd2 commit f27d2a7
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 3 deletions.
2 changes: 1 addition & 1 deletion web/components/solution/ExecutorUIDisplay.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export interface ExecutorUIDisplayProps {
}

const ExecutorUIDisplay = ({ jobId, onClose }: ExecutorUIDisplayProps) => {
const apiUrl = process.env.EXECUTOR_UI_URL ?? "http://localhost:3007";
const apiUrl = process.env.NODE_ENV === "production" ? "https://executor.code-canvas.app" : "http://localhost:3007";

return (
<Modal opened onClose={onClose} size="100%">
Expand Down
10 changes: 10 additions & 0 deletions web/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: '3'

services:
web:
image: ghcr.io/mathisburger/codecanvas-web:v0.1.0
ports:
- "3001:3000"
environment:
- API_URL=https://api.code-canvas.app
- EXECUTOR_UI_URL=https://executor.code-canvas.app
2 changes: 1 addition & 1 deletion web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"build": "NODE_ENV=production next build",
"start": "next start",
"lint": "next lint"
},
Expand Down
2 changes: 1 addition & 1 deletion web/service/ApiService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class ApiService {
private apiUrl: string;

constructor() {
this.apiUrl = process.env.API_URL ?? "http://localhost:3002";
this.apiUrl = process.env.NODE_ENV === "production" ? "https://api.code-canvas.app" : "http://localhost:3002";
}

public async self(): Promise<User | string> {
Expand Down

0 comments on commit f27d2a7

Please sign in to comment.