Skip to content

Commit a2a2baf

Browse files
authored
Created multiple docker files and updated readme to latest version (#553)
* Created docker-compose for postgres, network_mode: host * remove backend URI from riven compose since frontend uses it. * updated compose files for sqlite and postgres remove #comments from line. * Updated Backend Readme added 2 examples SQLite and Postgres and Backend Only - updated docker-compose files for (port specific and network_mode: host * cleared double line (typo) in readme
1 parent 652671e commit a2a2baf

File tree

2 files changed

+177
-14
lines changed

2 files changed

+177
-14
lines changed

README.md

+123-14
Original file line numberDiff line numberDiff line change
@@ -82,22 +82,131 @@ We are constantly adding features and improvements as we go along and squashing
8282

8383
Create a `docker-compose.yml` file with the following contents:
8484

85+
docker-compose.yml (Backend Only)
8586
```yml
87+
---
88+
services:
89+
riven:
90+
image: spoked/riven:latest
91+
container_name: riven
92+
restart: unless-stopped
93+
ports:
94+
- "8080:8080"
95+
tty: true
96+
environment:
97+
- PUID=1000
98+
- PGID=1000
99+
- TZ=Europe/Amsterdam
100+
- RIVEN_DATABASE_HOST=sqlite:////riven/data/media.db
101+
volumes:
102+
- ./riven-data:/riven/data
103+
- /mnt:/mnt
104+
```
105+
106+
docker-compose.yml (Frontend + Backend + SQLite)
107+
```yml
108+
---
109+
services:
110+
riven-frontend:
111+
image: spoked/riven-frontend:latest
112+
container_name: riven-frontend
113+
restart: unless-stopped
114+
network_mode: host
115+
tty: true
116+
environment:
117+
- PUID=1000
118+
- PGID=1000
119+
- ORIGIN=http://localhost:3000
120+
- BACKEND_URL=http://127.0.0.1:8080
121+
- TZ=Europe/Amsterdam
122+
depends_on:
123+
riven:
124+
condition: service_healthy
125+
126+
riven:
127+
image: spoked/riven:latest
128+
container_name: riven
129+
restart: unless-stopped
130+
network_mode: host
131+
tty: true
132+
environment:
133+
- PUID=1000
134+
- PGID=1000
135+
- TZ=Europe/Amsterdam
136+
- RIVEN_DATABASE_HOST=sqlite:////riven/data/media.db
137+
healthcheck:
138+
test: curl -s http://localhost:8080 >/dev/null || exit 1
139+
interval: 30s
140+
timeout: 10s
141+
retries: 10
142+
volumes:
143+
- ./riven-data:/riven/data
144+
- /mnt:/mnt
145+
```
146+
147+
docker-compose.yml (Frontend + Backend + Postgres)
148+
```yml
149+
---
86150
services:
87-
riven:
88-
image: spoked/riven:latest
89-
container_name: riven
90-
restart: unless-stopped
91-
environment:
92-
PUID: "1000"
93-
PGID: "1000"
94-
ORIGIN: "http://localhost:3000" # IMP: read below to avoid CORS issues
95-
BACKEND_URL: http://127.0.0.1:8080 # optional
96-
ports:
97-
- "3000:3000"
98-
volumes:
99-
- ./data:/riven/data
100-
- /mnt:/mnt
151+
riven-frontend:
152+
image: spoked/riven-frontend:latest
153+
container_name: riven-frontend
154+
restart: unless-stopped
155+
ports:
156+
- "3000:3000"
157+
tty: true
158+
environment:
159+
- PUID=1000
160+
- PGID=1000
161+
- ORIGIN=http://localhost:3000
162+
- BACKEND_URL=http://127.0.0.1:8080
163+
- TZ=Europe/Amsterdam
164+
depends_on:
165+
riven:
166+
condition: service_healthy
167+
168+
riven:
169+
image: spoked/riven:latest
170+
container_name: riven
171+
restart: unless-stopped
172+
ports:
173+
- "8080:8080"
174+
tty: true
175+
environment:
176+
- PUID=1000
177+
- PGID=1000
178+
- TZ=Europe/Amsterdam
179+
- RIVEN_DATABASE_HOST=postgresql+psycopg2://postgres:postgres@riven_postgres/riven
180+
healthcheck:
181+
test: curl -s http://localhost:8080 >/dev/null || exit 1
182+
interval: 30s
183+
timeout: 10s
184+
retries: 10
185+
volumes:
186+
- ./riven-data:/riven/data
187+
- /mnt:/mnt
188+
depends_on:
189+
riven_postgres:
190+
condition: service_healthy
191+
192+
riven_postgres:
193+
image: postgres:16.3-alpine3.20
194+
container_name: riven-db
195+
environment:
196+
POSTGRES_USER: postgres
197+
POSTGRES_PASSWORD: postgres
198+
POSTGRES_DB: riven
199+
healthcheck:
200+
test: ["CMD-SHELL", "pg_isready -U postgres"]
201+
interval: 30s
202+
timeout: 10s
203+
retries: 5
204+
networks:
205+
- postgres-internal
206+
207+
networks:
208+
postgres-internal:
209+
default:
101210
```
102211

103212
Then run `docker compose up -d` to start the container in the background. You can then access the web interface at `http://localhost:3000` or whatever port and origin you set in the `docker-compose.yml` file.

docker-compose-postgres-host.yml

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
---
2+
services:
3+
riven-frontend:
4+
image: spoked/riven-frontend:latest
5+
container_name: riven-frontend
6+
restart: unless-stopped
7+
network_mode: host
8+
tty: true
9+
environment:
10+
- PUID=1000
11+
- PGID=1000
12+
- ORIGIN=http://localhost:3000
13+
- BACKEND_URL=http://127.0.0.1:8080
14+
- TZ=Europe/Amsterdam
15+
depends_on:
16+
riven:
17+
condition: service_healthy
18+
19+
riven:
20+
image: spoked/riven:latest
21+
container_name: riven
22+
restart: unless-stopped
23+
network_mode: host
24+
tty: true
25+
environment:
26+
- PUID=1000
27+
- PGID=1000
28+
- TZ=Europe/Amsterdam
29+
- RIVEN_DATABASE_HOST=postgresql+psycopg2://postgres:postgres@localhost/riven
30+
healthcheck:
31+
test: curl -s http://localhost:8080 >/dev/null || exit 1
32+
interval: 30s
33+
timeout: 10s
34+
retries: 10
35+
volumes:
36+
- ./riven-data:/riven/data
37+
- /mnt:/mnt
38+
depends_on:
39+
riven_postgres:
40+
condition: service_healthy
41+
42+
riven_postgres:
43+
image: postgres:16.3-alpine3.20
44+
container_name: riven-db
45+
environment:
46+
POSTGRES_USER: postgres
47+
POSTGRES_PASSWORD: postgres
48+
POSTGRES_DB: riven
49+
healthcheck:
50+
test: ["CMD-SHELL", "pg_isready -U postgres"]
51+
interval: 30s
52+
timeout: 10s
53+
retries: 5
54+
network_mode: host

0 commit comments

Comments
 (0)