Skip to content

Commit

Permalink
update compose
Browse files Browse the repository at this point in the history
  • Loading branch information
noogen committed Nov 21, 2018
1 parent 52daa6e commit 35adc81
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 11 deletions.
2 changes: 0 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,3 @@ RUN cd /usr/local/lambdaform \
&& git clone https://github.com/niiknow/lambda-form --branch ${LAMBDA_FORM_VERSION} /usr/local/lambdaform/app \
&& cd app && npm install
WORKDIR /usr/local/lambdaform/app

ENTRYPOINT [ "node", "--inspect=0.0.0.0:9777", "--nolazy", "./node_modules/.bin/sls", "offline", "start", "--host", "0.0.0.0", "--port", "5000", "--corsAllowOrigin", "*" ]
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
version: '3'
services:
lambdaform:
build:
context: .
build: .
restart: always
command: "npm run prod"
ports:
- '5000:5000'
environment:
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
{
"name": "lambda-form",
"version": "1.0.2",
"version": "1.1.3",
"description": "A form submission handler using Serverless and AWS Lambda",
"main": "handler.js",
"scripts": {
"deploy": "sls deploy && sls s3deploy",
"deploy-form": "sls deploy function -f formPostHandler",
"deploy-submission": "sls deploy function -f submissionHandler",
"deploy": "sls deploy --stage dev && sls s3deploy --stage dev",
"deploy-prod": "sls deploy --stage prod && sls s3deploy --stage prod",
"lint": "eslint --ext .js,.jsx ./",
"lint-fix": "eslint --fix --ext .js,.jsx ./",
"logs": "sls logs -f formPostHandler -t",
"serverless": "node_modules/.bin/serverless",
"sls": "node_modules/.bin/serverless",
"service-info": "sls info"
"service-info": "sls info",
"prod": "node_modules/.bin/serverless offline --stage prod"
},
"author": "Tom Noogen",
"license": "MIT",
Expand Down
9 changes: 7 additions & 2 deletions serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,25 @@ service: lambda-form
# Use the serverless-webpack plugin to transpile ES6
plugins:
- serverless-webpack
- serverless-offline
- serverless-plugin-existing-s3
- serverless-offline

# serverless-webpack configuration
# Enable auto-packing of external modules
custom:
webpack:
webpackConfig: ./webpack.config.js
includeModules: true
serverless-offline:
host: 0.0.0.0
port: 5000
corsAllowOrigin: "*"
corsAllowHeaders: "Origin, X-Requested-With, Content-Type, Accept"

provider:
name: aws
runtime: nodejs8.10
stage: dev
stage: ${opt:stage, 'dev'}
region: us-east-1
iamRoleStatements:
- Effect: "Allow"
Expand Down

0 comments on commit 35adc81

Please sign in to comment.