Use docker compose fragments instead of extend to prevent attribute duplication

This commit is contained in:
root 2024-11-12 09:53:31 -03:00
parent a9755211a4
commit 07d855ac35
2 changed files with 74 additions and 69 deletions

View file

@ -1,7 +1,7 @@
# Docker compose file for Backend 3 of inv.nadeko.net
#
services:
invidious-extend:
#https://docs.docker.com/reference/compose-file/fragments/
x-common-config: &common-config
env_file:
# Env file containing variables like TAG, INV_MEM_*
- .env
@ -19,7 +19,7 @@ services:
depends_on:
# - inv_sig_helper
- haproxy
environment:
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
@ -27,28 +27,30 @@ services:
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

View file

@ -1,7 +1,7 @@
# Docker compose file for Backend 2 of inv.nadeko.net
services:
invidious-extend:
#https://docs.docker.com/reference/compose-file/fragments/
x-common-config: &common-config
env_file:
# Env file containing variables like TAG, INV_MEM_*
- .env
@ -19,7 +19,7 @@ services:
depends_on:
# - inv_sig_helper
- haproxy
environment:
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
@ -27,28 +27,30 @@ services:
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