Skip to content

Commit

Permalink
Update examples to remove Swarm format in stack.yml
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Ellis (OpenFaaS Ltd) <alexellis2@gmail.com>
  • Loading branch information
alexellis committed Sep 21, 2022
1 parent dff5735 commit d08553e
Showing 1 changed file with 14 additions and 31 deletions.
45 changes: 14 additions & 31 deletions stack.yml
Original file line number Diff line number Diff line change
@@ -1,66 +1,49 @@
provider:
name: openfaas
gateway: http://127.0.0.1:8080 # can be a remote server

## Note for Kubernetes memory specifications:
## Run: `sed -ie s/40m/40Mi/g stack.yml`
gateway: http://127.0.0.1:8080

functions:
url-ping:
annotations:
test: true
labels:
com.openfaas: 1
com.openfaas.scale.min: 1
com.openfaas.scale.max: 1
lang: python
handler: ./sample/url-ping
image: ${DOCKER_USER:-alexellis}/faas-url-ping:0.2
image: ${DOCKER_USER:-alexellis2}/url-ping:0.3
environment:
debug: true

# limits:
# memory: 40m
# requests:
# memory: 40m
# memory: 32Mi
# limits:
# memory: 64Mi

# skip_build is useful for deploying pre-existing images from stack.yml
stronghash:
skip_build: true
image: functions/alpine:latest
image: ghcr.io/openfaas/alpine:latest
fprocess: "sha512sum"
environment:
fprocess: sha512sum
secrets:
- test1
# limits:
# memory: 40m
# requests:
# memory: 40m

nodejs-echo:
lang: node
handler: ./sample/nodejs-echo
image: alexellis/faas-nodejs-echo:0.1
# limits:
# memory: 40m
# requests:
# memory: 40m
image: ${DOCKER_USER:-alexellis2}/nodejs-echo:0.2

# Example usage:
#
# curl 127.0.0.1:8080/function/shrink-image --data-binary @big.png > smaller.png
shrink-image:
lang: dockerfile
handler: ./sample/imagemagick
image: functions/resizer:0.1
image: ${DOCKER_USER:-alexellis2}/imagemagick-resizer:0.3
fprocess: "convert - -resize 50% fd:1"
# limits:
# memory: 40m
# requests:
# memory: 40m

ruby-echo:
lang: ruby
handler: ./sample/ruby-echo
image: alexellis/ruby-echo:0.2
# limits:
# memory: 40m
# requests:
# memory: 40m

image: ${DOCKER_USER:-alexellis2}/ruby-echo:0.3

0 comments on commit d08553e

Please sign in to comment.