add robots.txt file
This commit is contained in:
parent
74daef26af
commit
8baa39eeaa
@ -24,3 +24,6 @@ PB_DISCUSSIONS_PRESELECT=false
|
||||
PB_DEFAULT_FORMATTER=plaintext # options: plaintext syntaxhighlighting & markdown
|
||||
|
||||
PB_EMAIL_ENABLE=true
|
||||
|
||||
# Setting this to true will allow the PrivateBin crawler to add your instance to the public list of PrivateBin instances
|
||||
PB_PUBLIC_DIRECTORY=false
|
@ -7,9 +7,14 @@ services:
|
||||
configs:
|
||||
- source: php_config
|
||||
target: /cfg/conf.php
|
||||
- source: robots
|
||||
target: /var/www/robots.txt
|
||||
networks:
|
||||
- proxy
|
||||
read_only: true
|
||||
environment:
|
||||
- CONFIG_PATH=/cfg/conf.php
|
||||
- PB_PUBLIC_DIRECTORY
|
||||
deploy:
|
||||
restart_policy:
|
||||
condition: on-failure
|
||||
@ -42,3 +47,7 @@ configs:
|
||||
name: ${STACK_NAME}_php_config_${PB_PHP_CONFIG_VERSION}
|
||||
file: conf.php.tmpl
|
||||
template_driver: golang
|
||||
robots:
|
||||
name: ${STACK_NAME}_robots_${PB_ROBOTS_VERSION}
|
||||
file: robots.txt.tmpl
|
||||
template_driver: golang
|
||||
|
8
robots.txt.tmpl
Normal file
8
robots.txt.tmpl
Normal file
@ -0,0 +1,8 @@
|
||||
User-agent: *
|
||||
Disallow: /
|
||||
|
||||
{{ if eq $PB_PUBLIC_DIRECTORY "true" }}
|
||||
User-agent: PrivateBinDirectoryBot
|
||||
Disallow: /
|
||||
{{ else }}
|
||||
{{ end }}
|
Loading…
x
Reference in New Issue
Block a user