Created
July 21, 2020 16:26
-
-
Save alexellis/b8234981edcdf71ebd6b31b52ee311b4 to your computer and use it in GitHub Desktop.
Hack on JavaScript for OpenFaaS using Docker Compose
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Assume that you ran "faas-cli new --lang node12 api2" before starting with this file. | |
version: '3.3' | |
services: | |
api2: | |
build: | |
context: ./template/node12 | |
ports: | |
- 8000:3000 | |
environment: | |
fprocess: nodemon index.js | |
secrets: | |
- message | |
volumes: | |
- ./api2:/home/app/function | |
user: root | |
command: sh -c "npm i -g nodemon && fwatchdog" | |
secrets: | |
message: | |
file: ./secrets/message | |
# https://gitlab.com/MrSimonEmms/openfaas-functions/-/blob/master/docker-compose.yaml | |
# https://blog.alexellis.io/expose-grafana-dashboards/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment