override environment

This commit is contained in:
mercury
2024-03-07 10:20:43 +04:00
parent 11e34d8c4e
commit dea46815c7
3 changed files with 68 additions and 45 deletions
+1
View File
@@ -8,3 +8,4 @@ TGPORT=4443
IMAGE=alpine:3.18.2 IMAGE=alpine:3.18.2
IP= IP=
VER= VER=
ENV=/root/.ashrc
+2
View File
@@ -18,3 +18,5 @@
mirror/.env mirror/.env
update/* update/*
!update/update.sh !update/update.sh
override.env
+65 -45
View File
@@ -41,8 +41,11 @@ services:
condition: service_started condition: service_started
ss: ss:
condition: service_started condition: service_started
environment: env_file:
TZ: ${TZ} - path: ./.env
required: true # default
- path: ./override.env
required: false
stop_grace_period: 1s stop_grace_period: 1s
command: ["/bin/sh", "/start_upstream.sh"] command: ["/bin/sh", "/start_upstream.sh"]
networks: networks:
@@ -73,9 +76,11 @@ services:
depends_on: depends_on:
up: up:
condition: service_started condition: service_started
environment: env_file:
TZ: ${TZ} - path: ./.env
SSPORT: ${SSPORT} required: true # default
- path: ./override.env
required: false
stop_grace_period: 1s stop_grace_period: 1s
command: ["/bin/sh", "/start_ng.sh"] command: ["/bin/sh", "/start_ng.sh"]
networks: networks:
@@ -103,15 +108,13 @@ services:
- ./.env:/mirror/.env - ./.env:/mirror/.env
- ./update:/update - ./update:/update
environment: environment:
TZ: ${TZ}
IP: ${IP} IP: ${IP}
ADDRESS: ${WGADDRESS}
WGPORT: ${WGPORT}
WG1ADDRESS: ${WG1ADDRESS}
WG1PORT: ${WG1PORT}
SSPORT: ${SSPORT}
TGPORT: ${TGPORT}
VER: ${VER} VER: ${VER}
env_file:
- path: ./.env
required: true # default
- path: ./override.env
required: false
hostname: php hostname: php
container_name: php-${VER} container_name: php-${VER}
restart: unless-stopped restart: unless-stopped
@@ -146,15 +149,13 @@ services:
- ./update:/update - ./update:/update
- ./scripts/start_service.sh:/start_service.sh - ./scripts/start_service.sh:/start_service.sh
environment: environment:
TZ: ${TZ}
IP: ${IP} IP: ${IP}
ADDRESS: ${WGADDRESS}
WGPORT: ${WGPORT}
WG1ADDRESS: ${WG1ADDRESS}
WG1PORT: ${WG1PORT}
SSPORT: ${SSPORT}
TGPORT: ${TGPORT}
VER: ${VER} VER: ${VER}
env_file:
- path: ./.env
required: true # default
- path: ./override.env
required: false
hostname: service hostname: service
container_name: service-${VER} container_name: service-${VER}
# restart: unless-stopped # restart: unless-stopped
@@ -200,7 +201,11 @@ services:
ipv4_address: 10.10.0.3 ipv4_address: 10.10.0.3
environment: environment:
TZ: ${TZ} TZ: ${TZ}
SSPORT: ${SSPORT} env_file:
- path: ./.env
required: true # default
- path: ./override.env
required: false
stop_grace_period: 1s stop_grace_period: 1s
command: ["/bin/sh", "/start_proxy.sh"] command: ["/bin/sh", "/start_proxy.sh"]
logging: *default-logging logging: *default-logging
@@ -227,11 +232,11 @@ services:
condition: service_healthy condition: service_healthy
ports: ports:
- ${WGPORT}:${WGPORT}/udp - ${WGPORT}:${WGPORT}/udp
environment: env_file:
TZ: ${TZ} - path: ./.env
WGPORT: ${WGPORT} required: true # default
ADDRESS: ${WGADDRESS} - path: ./override.env
ENV: /root/.ashrc required: false
cap_add: cap_add:
- NET_ADMIN - NET_ADMIN
devices: devices:
@@ -265,11 +270,11 @@ services:
condition: service_healthy condition: service_healthy
ports: ports:
- ${WG1PORT}:${WG1PORT}/udp - ${WG1PORT}:${WG1PORT}/udp
environment: env_file:
TZ: ${TZ} - path: ./.env
WGPORT: ${WG1PORT} required: true # default
ADDRESS: ${WG1ADDRESS} - path: ./override.env
ENV: /root/.ashrc required: false
cap_add: cap_add:
- NET_ADMIN - NET_ADMIN
devices: devices:
@@ -304,8 +309,11 @@ services:
depends_on: depends_on:
php: php:
condition: service_healthy condition: service_healthy
environment: env_file:
TZ: ${TZ} - path: ./.env
required: true # default
- path: ./override.env
required: false
stop_grace_period: 1s stop_grace_period: 1s
networks: networks:
default: default:
@@ -334,9 +342,11 @@ services:
ports: ports:
- ${SSPORT}:${SSPORT}/tcp - ${SSPORT}:${SSPORT}/tcp
- ${SSPORT}:${SSPORT}/udp - ${SSPORT}:${SSPORT}/udp
environment: env_file:
TZ: ${TZ} - path: ./.env
SSPORT: ${SSPORT} required: true # default
- path: ./override.env
required: false
stop_grace_period: 1s stop_grace_period: 1s
command: ["/bin/sh", "/start_ss.sh"] command: ["/bin/sh", "/start_ss.sh"]
networks: networks:
@@ -361,9 +371,12 @@ services:
ports: ports:
- ${TGPORT}:${TGPORT} - ${TGPORT}:${TGPORT}
environment: environment:
TZ: ${TZ}
IP: ${IP} IP: ${IP}
TGPORT: ${TGPORT} env_file:
- path: ./.env
required: true # default
- path: ./override.env
required: false
stop_grace_period: 1s stop_grace_period: 1s
command: ["/bin/sh", "/start_tg.sh"] command: ["/bin/sh", "/start_tg.sh"]
networks: networks:
@@ -387,8 +400,11 @@ services:
depends_on: depends_on:
php: php:
condition: service_healthy condition: service_healthy
environment: env_file:
TZ: ${TZ} - path: ./.env
required: true # default
- path: ./override.env
required: false
stop_grace_period: 1s stop_grace_period: 1s
command: ["/bin/sh", "/start_xray.sh"] command: ["/bin/sh", "/start_xray.sh"]
networks: networks:
@@ -413,9 +429,11 @@ services:
depends_on: depends_on:
php: php:
condition: service_healthy condition: service_healthy
environment: env_file:
TZ: ${TZ} - path: ./.env
ENV: /root/.ashrc required: true # default
- path: ./override.env
required: false
stop_grace_period: 1s stop_grace_period: 1s
command: ["/bin/sh", "/start_oc.sh"] command: ["/bin/sh", "/start_oc.sh"]
cap_add: cap_add:
@@ -444,9 +462,11 @@ services:
depends_on: depends_on:
php: php:
condition: service_healthy condition: service_healthy
environment: env_file:
TZ: ${TZ} - path: ./.env
ENV: /root/.ashrc required: true # default
- path: ./override.env
required: false
stop_grace_period: 1s stop_grace_period: 1s
command: ["/bin/sh", "/start_np.sh"] command: ["/bin/sh", "/start_np.sh"]
cap_add: cap_add: