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.bak
|
||||
.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 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"));
|
||||
}
|
||||
|
||||
|
|
|
@ -46,28 +46,31 @@ services:
|
|||
# dockerfile: Dockerfile.vorebot
|
||||
# image: asklyphe/vorebot
|
||||
|
||||
# bingservice:
|
||||
# restart: unless-stopped
|
||||
# networks:
|
||||
# - lyphenet
|
||||
# - outer
|
||||
# env_file: ".env"
|
||||
# depends_on:
|
||||
# - nats
|
||||
# build:
|
||||
# dockerfile: Dockerfile.bingservice
|
||||
# image: asklyphe/bingservice
|
||||
# googleservice:
|
||||
# restart: unless-stopped
|
||||
# networks:
|
||||
# - lyphenet
|
||||
# env_file: ".env"
|
||||
# depends_on:
|
||||
# - nats
|
||||
# - bingservice
|
||||
# build:
|
||||
# dockerfile: Dockerfile.googleservice
|
||||
# image: asklyphe/googleservice
|
||||
bingservice:
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- lyphenet
|
||||
- outer
|
||||
env_file: ".env"
|
||||
depends_on:
|
||||
- nats
|
||||
build:
|
||||
dockerfile: Dockerfile.bingservice
|
||||
volumes:
|
||||
- ./proxies.txt:/data/proxies.txt
|
||||
image: asklyphe/bingservice
|
||||
googleservice:
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- lyphenet
|
||||
- outer
|
||||
env_file: ".env"
|
||||
depends_on:
|
||||
- nats
|
||||
- bingservice
|
||||
build:
|
||||
dockerfile: Dockerfile.googleservice
|
||||
image: asklyphe/googleservice
|
||||
|
||||
nats:
|
||||
restart: unless-stopped
|
||||
|
@ -104,9 +107,9 @@ services:
|
|||
- "1235:81"
|
||||
|
||||
networks:
|
||||
outer:
|
||||
lyphenet:
|
||||
internal: true
|
||||
outer:
|
||||
|
||||
volumes:
|
||||
frontend_data:
|
||||
|
|
Loading…
Add table
Reference in a new issue