Skip to content

Commit a8021e0

Browse files
Merge pull request #2917 from iv-org/better-compose
Enhance the development compose file
2 parents 5d1a1fe + 16530ac commit a8021e0

File tree

1 file changed

+33
-24
lines changed

1 file changed

+33
-24
lines changed

docker-compose.yml

Lines changed: 33 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,12 @@
1-
version: '3'
1+
# Warning: This docker-compose file is made for development purposes.
2+
# Using it will build an image from the locally cloned repository.
3+
#
4+
# If you want to use Invidious in production, see the docker-compose.yml file provided
5+
# in the installation documentation: https://docs.invidious.io/Installation.md
6+
7+
version: "3"
28
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"]
9+
1610
invidious:
1711
build:
1812
context: .
@@ -21,27 +15,42 @@ services:
2115
ports:
2216
- "127.0.0.1:3000:3000"
2317
environment:
24-
# Adapted from ./config/config.yml
18+
# Please read the following file for a comprehensive list of all available
19+
# configuration options and their associated syntax:
20+
# https://github.com/iv-org/invidious/blob/master/config/config.example.yml
2521
INVIDIOUS_CONFIG: |
26-
channel_threads: 1
27-
check_tables: true
28-
feed_threads: 1
2922
db:
23+
dbname: invidious
3024
user: kemal
3125
password: kemal
32-
host: postgres
26+
host: invidious-db
3327
port: 5432
34-
dbname: invidious
35-
full_refresh: false
36-
https_only: false
37-
domain:
28+
check_tables: true
29+
# external_port:
30+
# domain:
31+
# https_only: false
32+
# statistics_enabled: false
3833
healthcheck:
3934
test: wget -nv --tries=1 --spider http://127.0.0.1:3000/api/v1/comments/jNQXAC9IVRw || exit 1
4035
interval: 30s
4136
timeout: 5s
4237
retries: 2
4338
depends_on:
44-
- postgres
39+
- invidious-db
40+
41+
invidious-db:
42+
image: docker.io/library/postgres:14
43+
restart: unless-stopped
44+
volumes:
45+
- postgresdata:/var/lib/postgresql/data
46+
- ./config/sql:/config/sql
47+
- ./docker/init-invidious-db.sh:/docker-entrypoint-initdb.d/init-invidious-db.sh
48+
environment:
49+
POSTGRES_DB: invidious
50+
POSTGRES_USER: kemal
51+
POSTGRES_PASSWORD: kemal
52+
healthcheck:
53+
test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB"]
4554

4655
volumes:
4756
postgresdata:

0 commit comments

Comments
 (0)