Skip to content

Instantly share code, notes, and snippets.

@alexellis
Created July 21, 2020 16:26
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexellis/b8234981edcdf71ebd6b31b52ee311b4 to your computer and use it in GitHub Desktop.
Save alexellis/b8234981edcdf71ebd6b31b52ee311b4 to your computer and use it in GitHub Desktop.
Hack on JavaScript for OpenFaaS using Docker Compose
# 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