Skip to content

Commit

Permalink
Document usage of global whitelist
Browse files Browse the repository at this point in the history
  • Loading branch information
yajo committed Aug 24, 2018
1 parent d53ff6e commit bd85661
Showing 1 changed file with 80 additions and 0 deletions.
80 changes: 80 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -728,6 +728,86 @@ Test it in your machine with:

This environment also needs a [global inverse proxy](#global-inverse-proxy).

###### Global whitelist

Since the testing environment is [network-isolated](#network-isolation),
this can change some deadlocks or big timeouts in code chunks that are not
ready for such situation. Odoo happens to have some of them.

The [development][] environment includes the default recommended whitelist
proxies, but for [testing][], it is recommended to have a separate docker
compose project running along in the same server that provides a
`globalwhitelist_default` network where all whitelist proxies exist. This is
a better practice for a testing environment where many services might coexist,
because it will let you save lots of processing power and IP addresses.

The recommended `globalwhitelist/docker-compose.yaml` file should contain:

```yaml
version: "2.1"
networks:
shared:
driver_opts:
encrypted: 1
services:
cdnjs_cloudflare_com:
image: tecnativa/whitelist
restart: unless-stopped
networks:
shared:
aliases:
- "cdnjs.cloudflare.com"
environment:
TARGET: "cdnjs.cloudflare.com"
PRE_RESOLVE:
fonts_googleapis_com:
image: tecnativa/whitelist
restart: unless-stopped
networks:
shared:
aliases:
- "fonts.googleapis.com"
environment:
TARGET: "fonts.googleapis.com"
PRE_RESOLVE:
fonts_gstatic_com:
image: tecnativa/whitelist
restart: unless-stopped
networks:
shared:
aliases:
- "fonts.gstatic.com"
environment:
TARGET: "fonts.gstatic.com"
PRE_RESOLVE:
www_google_com:
image: tecnativa/whitelist
restart: unless-stopped
networks:
shared:
aliases:
- "www.google.com"
environment:
TARGET: "www.google.com"
PRE_RESOLVE:
www_gravatar_com:
image: tecnativa/whitelist
restart: unless-stopped
networks:
shared:
aliases:
- "www.gravatar.com"
environment:
TARGET: "www.gravatar.com"
PRE_RESOLVE:
```

#### Other usage scenarios

In examples below I will skip the `-f <environment>.yaml` part and assume you
Expand Down

0 comments on commit bd85661

Please sign in to comment.