forked from asklyphe-public/asklyphe
reenable bing & google services in dockerfile, fix bingservice crash when proxies file is empty
This commit is contained in:
parent
7fbe876c54
commit
430e0fce85
3 changed files with 28 additions and 24 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -4,3 +4,4 @@
|
||||||
database
|
database
|
||||||
database.bak
|
database.bak
|
||||||
.env
|
.env
|
||||||
|
proxies.txt
|
||||||
|
|
|
@ -34,7 +34,7 @@ pub static PROXIES: Lazy<Vec<Proxy>> = Lazy::new(|| {
|
||||||
let contents = std::fs::read_to_string(proxy_file);
|
let contents = std::fs::read_to_string(proxy_file);
|
||||||
let mut proxies = vec![];
|
let mut proxies = vec![];
|
||||||
|
|
||||||
for line in contents.expect("FAILED TO READ FILE").lines() {
|
for line in contents.expect("FAILED TO READ FILE").lines().filter(|l| l.len() > 0) {
|
||||||
proxies.push(Proxy::from_str(line).expect("INVALID PROXY"));
|
proxies.push(Proxy::from_str(line).expect("INVALID PROXY"));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -46,28 +46,31 @@ services:
|
||||||
# dockerfile: Dockerfile.vorebot
|
# dockerfile: Dockerfile.vorebot
|
||||||
# image: asklyphe/vorebot
|
# image: asklyphe/vorebot
|
||||||
|
|
||||||
# bingservice:
|
bingservice:
|
||||||
# restart: unless-stopped
|
restart: unless-stopped
|
||||||
# networks:
|
networks:
|
||||||
# - lyphenet
|
- lyphenet
|
||||||
# - outer
|
- outer
|
||||||
# env_file: ".env"
|
env_file: ".env"
|
||||||
# depends_on:
|
depends_on:
|
||||||
# - nats
|
- nats
|
||||||
# build:
|
build:
|
||||||
# dockerfile: Dockerfile.bingservice
|
dockerfile: Dockerfile.bingservice
|
||||||
# image: asklyphe/bingservice
|
volumes:
|
||||||
# googleservice:
|
- ./proxies.txt:/data/proxies.txt
|
||||||
# restart: unless-stopped
|
image: asklyphe/bingservice
|
||||||
# networks:
|
googleservice:
|
||||||
# - lyphenet
|
restart: unless-stopped
|
||||||
# env_file: ".env"
|
networks:
|
||||||
# depends_on:
|
- lyphenet
|
||||||
# - nats
|
- outer
|
||||||
# - bingservice
|
env_file: ".env"
|
||||||
# build:
|
depends_on:
|
||||||
# dockerfile: Dockerfile.googleservice
|
- nats
|
||||||
# image: asklyphe/googleservice
|
- bingservice
|
||||||
|
build:
|
||||||
|
dockerfile: Dockerfile.googleservice
|
||||||
|
image: asklyphe/googleservice
|
||||||
|
|
||||||
nats:
|
nats:
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
|
@ -104,9 +107,9 @@ services:
|
||||||
- "1235:81"
|
- "1235:81"
|
||||||
|
|
||||||
networks:
|
networks:
|
||||||
|
outer:
|
||||||
lyphenet:
|
lyphenet:
|
||||||
internal: true
|
internal: true
|
||||||
outer:
|
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
frontend_data:
|
frontend_data:
|
||||||
|
|
Loading…
Add table
Reference in a new issue