Skip to content

Commit 05c5d29

Browse files
Enhance the development compose file
1 parent 505a81d commit 05c5d29

File tree

1 file changed

+25
-23
lines changed

1 file changed

+25
-23
lines changed

docker-compose.yml

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,6 @@
1-
version: '3'
1+
version: "3"
22
services:
3-
postgres:
4-
image: postgres:10
5-
restart: unless-stopped
6-
volumes:
7-
- postgresdata:/var/lib/postgresql/data
8-
- ./config/sql:/config/sql
9-
- ./docker/init-invidious-db.sh:/docker-entrypoint-initdb.d/init-invidious-db.sh
10-
environment:
11-
POSTGRES_DB: invidious
12-
POSTGRES_PASSWORD: kemal
13-
POSTGRES_USER: kemal
14-
healthcheck:
15-
test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB"]
3+
164
invidious:
175
build:
186
context: .
@@ -21,27 +9,41 @@ services:
219
ports:
2210
- "127.0.0.1:3000:3000"
2311
environment:
24-
# Adapted from ./config/config.yml
2512
INVIDIOUS_CONFIG: |
26-
channel_threads: 1
13+
# Please read the following file for a comprehensive list of all available
14+
# configuration options and their associated syntax:
15+
# https://github.com/iv-org/invidious/blob/master/config/config.example.yml
2716
check_tables: true
28-
feed_threads: 1
2917
db:
18+
dbname: invidious
3019
user: kemal
3120
password: kemal
32-
host: postgres
21+
host: invidious-postgres
3322
port: 5432
34-
dbname: invidious
35-
full_refresh: false
36-
https_only: false
37-
domain:
23+
# https_only: false
24+
# domain:
25+
# external_port:
3826
healthcheck:
3927
test: wget -nv --tries=1 --spider http://127.0.0.1:3000/api/v1/comments/jNQXAC9IVRw || exit 1
4028
interval: 30s
4129
timeout: 5s
4230
retries: 2
4331
depends_on:
44-
- postgres
32+
- invidious-postgres
33+
34+
invidious-postgres:
35+
image: postgres:14
36+
restart: unless-stopped
37+
volumes:
38+
- postgresdata:/var/lib/postgresql/data
39+
- ./config/sql:/config/sql
40+
- ./docker/init-invidious-db.sh:/docker-entrypoint-initdb.d/init-invidious-db.sh
41+
environment:
42+
POSTGRES_DB: invidious
43+
POSTGRES_USER: kemal
44+
POSTGRES_PASSWORD: kemal
45+
healthcheck:
46+
test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB"]
4547

4648
volumes:
4749
postgresdata:

0 commit comments

Comments
 (0)