Use docker compose fragments instead of extend to prevent attribute duplication
This commit is contained in:
parent
a9755211a4
commit
07d855ac35
2 changed files with 74 additions and 69 deletions
|
@ -1,54 +1,56 @@
|
|||
# Docker compose file for Backend 3 of inv.nadeko.net
|
||||
#
|
||||
services:
|
||||
invidious-extend:
|
||||
env_file:
|
||||
# Env file containing variables like TAG, INV_MEM_*
|
||||
- .env
|
||||
# Env file containing INVIDIOUS_* variables
|
||||
- ../.env
|
||||
image: "git.nadeko.net/fijxu/invidious:${TAG}"
|
||||
restart: unless-stopped
|
||||
mem_limit: ${INV_MEM_LIMIT}
|
||||
mem_reservation: ${INV_MEM_RESERVATION}
|
||||
cpus: ${INV_CPU} # Limit to X% of the CPU
|
||||
network_mode: "service:gluetun"
|
||||
volumes:
|
||||
- /var/run/postgresql/.s.PGSQL.5432:/var/run/postgresql/.s.PGSQL.5432:rw
|
||||
- ./config.yml:/etc/invidious/config.yml:ro
|
||||
depends_on:
|
||||
# - inv_sig_helper
|
||||
- haproxy
|
||||
environment:
|
||||
INVIDIOUS_CONFIG_FILE: "/etc/invidious/config.yml"
|
||||
healthcheck:
|
||||
test: wget -nv --tries=1 --spider https://inv.nadeko.net/watch?v=mcYLzu_1cNc || exit 1
|
||||
interval: 300s
|
||||
timeout: 5s
|
||||
retries: 2
|
||||
|
||||
#https://docs.docker.com/reference/compose-file/fragments/
|
||||
x-common-config: &common-config
|
||||
env_file:
|
||||
# Env file containing variables like TAG, INV_MEM_*
|
||||
- .env
|
||||
# Env file containing INVIDIOUS_* variables
|
||||
- ../.env
|
||||
image: "git.nadeko.net/fijxu/invidious:${TAG}"
|
||||
restart: unless-stopped
|
||||
mem_limit: ${INV_MEM_LIMIT}
|
||||
mem_reservation: ${INV_MEM_RESERVATION}
|
||||
cpus: ${INV_CPU} # Limit to X% of the CPU
|
||||
network_mode: "service:gluetun"
|
||||
volumes:
|
||||
- /var/run/postgresql/.s.PGSQL.5432:/var/run/postgresql/.s.PGSQL.5432:rw
|
||||
- ./config.yml:/etc/invidious/config.yml:ro
|
||||
depends_on:
|
||||
# - inv_sig_helper
|
||||
- haproxy
|
||||
environment: &env
|
||||
INVIDIOUS_CONFIG_FILE: "/etc/invidious/config.yml"
|
||||
healthcheck:
|
||||
test: wget -nv --tries=1 --spider https://inv.nadeko.net/watch?v=mcYLzu_1cNc || exit 1
|
||||
interval: 300s
|
||||
timeout: 5s
|
||||
retries: 2
|
||||
|
||||
services:
|
||||
# INVIDIOUS CLEARNET
|
||||
invidious:
|
||||
extends:
|
||||
service: invidious-extend
|
||||
<<: *common-config
|
||||
environment:
|
||||
<<: *env
|
||||
INVIDIOUS_PORT: "3000"
|
||||
|
||||
invidious2:
|
||||
extends:
|
||||
service: invidious-extend
|
||||
<<: *common-config
|
||||
environment:
|
||||
<<: *env
|
||||
INVIDIOUS_PORT: "3001"
|
||||
|
||||
invidious3:
|
||||
extends:
|
||||
service: invidious-extend
|
||||
<<: *common-config
|
||||
environment:
|
||||
<<: *env
|
||||
INVIDIOUS_PORT: "3002"
|
||||
|
||||
invidious4:
|
||||
extends:
|
||||
service: invidious-extend
|
||||
<<: *common-config
|
||||
environment:
|
||||
<<: *env
|
||||
INVIDIOUS_PORT: "3003"
|
||||
|
||||
# SIGNATURE HELPER
|
||||
|
|
|
@ -1,54 +1,56 @@
|
|||
# Docker compose file for Backend 2 of inv.nadeko.net
|
||||
|
||||
services:
|
||||
invidious-extend:
|
||||
env_file:
|
||||
# Env file containing variables like TAG, INV_MEM_*
|
||||
- .env
|
||||
# Env file containing INVIDIOUS_* variables
|
||||
- ../.env
|
||||
image: "git.nadeko.net/fijxu/invidious:${TAG}"
|
||||
restart: unless-stopped
|
||||
mem_limit: ${INV_MEM_LIMIT}
|
||||
mem_reservation: ${INV_MEM_RESERVATION}
|
||||
cpus: ${INV_CPU} # Limit to X% of the CPU
|
||||
network_mode: "service:gluetun"
|
||||
volumes:
|
||||
- /var/run/postgresql/.s.PGSQL.5432:/var/run/postgresql/.s.PGSQL.5432:rw
|
||||
- ./config.yml:/etc/invidious/config.yml:ro
|
||||
depends_on:
|
||||
# - inv_sig_helper
|
||||
- haproxy
|
||||
environment:
|
||||
INVIDIOUS_CONFIG_FILE: "/etc/invidious/config.yml"
|
||||
healthcheck:
|
||||
test: wget -nv --tries=1 --spider https://inv.nadeko.net/watch?v=mcYLzu_1cNc || exit 1
|
||||
interval: 300s
|
||||
timeout: 5s
|
||||
retries: 2
|
||||
#https://docs.docker.com/reference/compose-file/fragments/
|
||||
x-common-config: &common-config
|
||||
env_file:
|
||||
# Env file containing variables like TAG, INV_MEM_*
|
||||
- .env
|
||||
# Env file containing INVIDIOUS_* variables
|
||||
- ../.env
|
||||
image: "git.nadeko.net/fijxu/invidious:${TAG}"
|
||||
restart: unless-stopped
|
||||
mem_limit: ${INV_MEM_LIMIT}
|
||||
mem_reservation: ${INV_MEM_RESERVATION}
|
||||
cpus: ${INV_CPU} # Limit to X% of the CPU
|
||||
network_mode: "service:gluetun"
|
||||
volumes:
|
||||
- /var/run/postgresql/.s.PGSQL.5432:/var/run/postgresql/.s.PGSQL.5432:rw
|
||||
- ./config.yml:/etc/invidious/config.yml:ro
|
||||
depends_on:
|
||||
# - inv_sig_helper
|
||||
- haproxy
|
||||
environment: &env
|
||||
INVIDIOUS_CONFIG_FILE: "/etc/invidious/config.yml"
|
||||
healthcheck:
|
||||
test: wget -nv --tries=1 --spider https://inv.nadeko.net/watch?v=mcYLzu_1cNc || exit 1
|
||||
interval: 300s
|
||||
timeout: 5s
|
||||
retries: 2
|
||||
|
||||
services:
|
||||
# INVIDIOUS CLEARNET
|
||||
invidious:
|
||||
extends:
|
||||
service: invidious-extend
|
||||
<<: *common-config
|
||||
environment:
|
||||
<<: *env
|
||||
INVIDIOUS_PORT: "3000"
|
||||
|
||||
invidious2:
|
||||
extends:
|
||||
service: invidious-extend
|
||||
<<: *common-config
|
||||
environment:
|
||||
<<: *env
|
||||
INVIDIOUS_PORT: "3001"
|
||||
|
||||
invidious3:
|
||||
extends:
|
||||
service: invidious-extend
|
||||
<<: *common-config
|
||||
environment:
|
||||
<<: *env
|
||||
INVIDIOUS_PORT: "3002"
|
||||
|
||||
invidious4:
|
||||
extends:
|
||||
service: invidious-extend
|
||||
<<: *common-config
|
||||
environment:
|
||||
<<: *env
|
||||
INVIDIOUS_PORT: "3003"
|
||||
|
||||
# SIGNATURE HELPER
|
||||
|
@ -130,3 +132,4 @@ networks:
|
|||
gluetun_network:
|
||||
external: true
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue