Skip to content

Commit 851f25a

Browse files
fix: minor QoL improvements and updated documentation and compose files (#193)
* fix: minor QoL improvements and updated documentation and compose files * chore: format
1 parent c354265 commit 851f25a

17 files changed

+1095
-726
lines changed

.env.example

-1
This file was deleted.

Dockerfile

-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ COPY --from=frontend /app/node_modules /riven/node_modules
2020
COPY --from=frontend /app/package.json /riven/package.json
2121
COPY version.txt /riven/
2222

23-
# ENTRYPOINT ["ORIGIN=$ORIGIN", "BACKEND_URL=$BACKEND_URL", "node", "/riven/build"]
24-
2523
# Add the entrypoint script
2624
COPY docker-entrypoint.sh /usr/local/bin/
2725
RUN chmod +x /usr/local/bin/docker-entrypoint.sh

README.md

+5-22
Original file line numberDiff line numberDiff line change
@@ -34,25 +34,7 @@ To run the frontend, you need to have the backend running. You can find the back
3434

3535
Make sure you have docker and docker-compose installed on your system.
3636

37-
Edit the `docker-compose.yml` (make sure to replace the environment variables with your own) file to match your setup:
38-
39-
> [!IMPORTANT]
40-
> It is very important to set the `ORIGIN` and `BACKEND_URL` environment variables correctly to make the frontend work properly. Read more about them [here](#environment-variables).
41-
42-
```yml
43-
services:
44-
riven-frontend:
45-
image: ghcr.io/rivenmedia/riven-frontend:latest
46-
container_name: riven-frontend
47-
restart: unless-stopped
48-
tty: true
49-
environment:
50-
- ORIGIN=http://localhost:3000 # No trailing slash, read more below
51-
- BACKEND_URL=http://127.0.0.1:8080 # No trailing slash, read more below
52-
- TZ=America/New_York
53-
ports:
54-
- '3000:3000'
55-
```
37+
Edit the [`docker-compose.yml`](./docker-compose.yml) (make sure to replace the environment variables with your own) file to match your setup:
5638

5739
Then run the following command:
5840

@@ -83,16 +65,17 @@ It will build the frontend in the `build` directory.
8365
Then run the following command:
8466

8567
```bash
86-
ORIGIN=http://localhost:3000 BACKEND_URL=http://127.0.0.1:8080 node build
68+
ORIGIN=http://localhost:3000 node build
8769
```
8870

8971
It will start the frontend on port `3000`.
9072

9173
### Environment variables
9274

93-
- `ORIGIN`: It's the URL you will use to access the frontend. If running behind a reverse proxy, you should set it to the URL of the reverse proxy, like `https://riven.example.com`. If running locally, you can let it be `http://localhost:3000` or you local server IP address like `http://192.168.1.45:3000`.
75+
> [!IMPORTANT]
76+
> `ORIGIN` is optional and is not required if you are using reverse proxy, which usually forwards the `x-forwarded-proto` and `x-forwarded-host` headers. If you are running the frontend directly, you should set the `ORIGIN` environment variable to the URL you will use to access the frontend.
9477
95-
- `BACKEND_URL`: The URL of the backend. Default should work in most cases. You can also replace it with container name of backend if you are using docker-compose.
78+
`ORIGIN`: It's the URL you will use to access the frontend. If running behind a reverse proxy, you should set it to the URL of the reverse proxy, like `https://riven.example.com`. If running locally, you can let it be `http://localhost:3000` or you local server IP address like `http://192.168.1.45:3000`.
9679

9780
---
9881

docker-compose.yml

+10-5
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
11
services:
22
riven-frontend:
3-
image: spoked/riven-frontend:latest
3+
image: spoked/riven-frontend:latest # Tags: latest/dev/x.x.x
44
container_name: riven-frontend
55
restart: unless-stopped
66
tty: true
77
environment:
8-
- ORIGIN=http://localhost:3000 # No trailing slash, read more below
9-
- BACKEND_URL=http://127.0.0.1:8080 # No trailing slash, read more below
8+
- ORIGIN=http://localhost:3000 # (Optional) No trailing slash, read more below
109
- TZ=America/New_York
11-
ports:
12-
- '3000:3000'
10+
expose:
11+
- 3000
12+
13+
# (Optional) Uncomment the following lines to bind the port to the host machine
14+
# ports:
15+
# - 3000:3000
16+
volumes:
17+
- ./config:/riven/config

docker-entrypoint.sh

-1
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,4 @@ else
77
export ORIGIN=${ORIGIN}
88
fi
99

10-
export BACKEND_URL=${BACKEND_URL}
1110
exec "$@"

package.json

+10-9
Original file line numberDiff line numberDiff line change
@@ -17,29 +17,30 @@
1717
"devDependencies": {
1818
"@hey-api/openapi-ts": "^0.53.12",
1919
"@sveltejs/adapter-node": "^5.2.12",
20-
"@sveltejs/kit": "^2.17.2",
20+
"@sveltejs/kit": "^2.19.0",
2121
"@sveltejs/vite-plugin-svelte": "^3.1.2",
22+
"@tailwindcss/container-queries": "^0.1.1",
2223
"@tailwindcss/typography": "^0.5.16",
2324
"@types/eslint": "^8.56.12",
2425
"@types/luxon": "^3.4.2",
2526
"@types/nprogress": "^0.2.3",
2627
"@types/uuid": "^9.0.8",
27-
"@types/ws": "^8.5.14",
28-
"autoprefixer": "^10.4.20",
29-
"eslint": "^9.20.1",
28+
"@types/ws": "^8.18.0",
29+
"autoprefixer": "^10.4.21",
30+
"eslint": "^9.22.0",
3031
"eslint-config-prettier": "^9.1.0",
3132
"eslint-plugin-svelte": "^2.46.1",
3233
"globals": "^15.15.0",
3334
"postcss": "^8.5.3",
34-
"prettier": "^3.5.1",
35+
"prettier": "^3.5.3",
3536
"prettier-plugin-svelte": "^3.3.3",
3637
"prettier-plugin-tailwindcss": "^0.5.14",
3738
"svelte": "^4.2.19",
3839
"svelte-check": "^3.8.6",
39-
"sveltekit-sse": "^0.13.12",
40+
"sveltekit-sse": "^0.13.14",
4041
"tailwindcss": "^3.4.17",
4142
"tslib": "^2.8.1",
42-
"typescript": "^5.7.3",
43+
"typescript": "^5.8.2",
4344
"typescript-eslint": "8.0.0-alpha.28",
4445
"vite": "^5.4.14",
4546
"vitest": "^2.1.9"
@@ -59,12 +60,12 @@
5960
"motion": "^10.18.0",
6061
"nprogress": "^0.2.0",
6162
"svelte-sonner": "^0.3.28",
62-
"sveltekit-superforms": "^2.23.1",
63+
"sveltekit-superforms": "^2.24.0",
6364
"tailwind-merge": "^2.6.0",
6465
"tailwind-variants": "^0.2.1",
6566
"uuid": "^9.0.1",
6667
"vaul-svelte": "^0.3.2",
67-
"ws": "^8.18.0",
68+
"ws": "^8.18.1",
6869
"zod": "^3.24.2"
6970
},
7071
"packageManager": "pnpm@9.5.0",

0 commit comments

Comments
 (0)