File tree 2 files changed +14
-5
lines changed
2 files changed +14
-5
lines changed Original file line number Diff line number Diff line change @@ -21,14 +21,17 @@ To run just the frontend, first install dependencies with
21
21
``` bash
22
22
npm i
23
23
```
24
- In ` next.config.js ` , set ` env.API_URL ` to the public API URL of the rCTF instance, and ` KLODD_URL ` to the public URL of
24
+ In ` next.config.js ` , set ` RCTF_BASE ` to the public URL of the backend rCTF instance, and ` KLODD_URL ` to the public URL of
25
25
the Klodd instancer frontend:
26
26
``` js
27
+ const RCTF_BASE = ' http://ctf.b01lers.com:9000' ;
28
+
27
29
const nextConfig = {
28
30
env: {
29
- API_BASE : ' http://ctf.b01lers.com:9000/ api/v1' ,
31
+ API_BASE : ` ${ RCTF_BASE } / api/v1` ,
30
32
KLODD_URL : ' https://klodd.localhost.direct'
31
- }
33
+ },
34
+ // ...
32
35
}
33
36
```
34
37
Then, run
@@ -47,7 +50,7 @@ RCTF_GIT_REF=master
47
50
48
51
You can then start both the rCTF backend and production frontend instance simultaneously with
49
52
``` bash
50
- docker- compose up -d --build
53
+ docker compose up -d --build
51
54
```
52
55
53
56
### Configuring
Original file line number Diff line number Diff line change
1
+ const RCTF_BASE = 'http://ctf.b01lers.com:9002' ;
2
+
1
3
/** @type {import('next').NextConfig } */
2
4
const nextConfig = {
3
5
env : {
4
- API_BASE : 'http://ctf.b01lers.com:9002/ api/v1' ,
6
+ API_BASE : ` ${ RCTF_BASE } / api/v1` ,
5
7
KLODD_URL : 'https://instancer.b01lersc.tf'
6
8
} ,
7
9
logging : {
@@ -15,6 +17,10 @@ const nextConfig = {
15
17
{
16
18
source : '/api/v1/:path*' ,
17
19
destination : `${ this . env . API_BASE } /:path*`
20
+ } ,
21
+ {
22
+ source : '/uploads' ,
23
+ destination : `${ RCTF_BASE } /uploads` ,
18
24
}
19
25
]
20
26
}
You can’t perform that action at this time.
0 commit comments