Skip to content

Commit e54f873

Browse files
committed
Simplify the configure openfaas section
**What** - Remove the "all together" snippet since the modification is so small and it should be clear. This should make it easier for someone to see what is happening instead of a large block of yaml Signed-off-by: Lucas Roesler <[email protected]>
1 parent 009a6bb commit e54f873

File tree

1 file changed

+0
-44
lines changed

1 file changed

+0
-44
lines changed

docs/reference/ssl/swarm-with-traefik.md

Lines changed: 0 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -102,50 +102,6 @@ Next, add the following `labels` directive to the `deploy` section of the gatewa
102102

103103
These labels expose the OpenFaaS gateway `/ui`, `/system`, and `/function` endpoints on port `8080` over Traefik.
104104

105-
All together, your `gateway` service should now look like
106-
107-
```yaml
108-
...
109-
gateway:
110-
image: openfaas/gateway:0.9.11
111-
networks:
112-
- functions
113-
environment:
114-
functions_provider_url: "http://faas-swarm:8080/"
115-
read_timeout: "300s" # Maximum time to read HTTP request
116-
write_timeout: "300s" # Maximum time to write HTTP response
117-
upstream_timeout: "300s" # Maximum duration of upstream function call - should be more than read_timeout and write_timeout
118-
dnsrr: "true" # Temporarily use dnsrr in place of VIP while issue persists on PWD
119-
faas_nats_address: "nats"
120-
faas_nats_port: 4222
121-
direct_functions: "true" # Functions are invoked directly over the overlay network
122-
direct_functions_suffix: ""
123-
basic_auth: "${BASIC_AUTH:-true}"
124-
secret_mount_path: "/run/secrets/"
125-
scale_from_zero: "true"
126-
deploy:
127-
labels:
128-
- traefik.port=8080
129-
- traefik.frontend.rule=PathPrefix:/ui,/system,/function
130-
resources:
131-
# limits: # Enable if you want to limit memory usage
132-
# memory: 200M
133-
reservations:
134-
memory: 100M
135-
restart_policy:
136-
condition: on-failure
137-
delay: 5s
138-
max_attempts: 20
139-
window: 380s
140-
placement:
141-
constraints:
142-
- 'node.platform.os == linux'
143-
secrets:
144-
- basic-auth-user
145-
- basic-auth-password
146-
...
147-
```
148-
149105
### Configure data volumes
150106

151107
Finally, while configuring Traefik, you mounted a volume called `acme`. You must now define the `acme` volume used for storing Let's Encrypt certificates. We can define an empty volume, meaning data will not persist if you destroy the container. If you destroy the container, the certificates will be regenerated the next time you start Traefik.

0 commit comments

Comments
 (0)