Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 64e20d6

Browse files
Fix dos on LAMBDA_TASK_ROOT
1 parent b505a0e commit 64e20d6

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

‎README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,12 +24,18 @@ Add this line to your project's `Gemfile` and then make sure to `bundle install`
2424
gem 'lambda_punch'
2525
```
2626

27-
Within your project or [Rails application's](https://lamby.custominktech.com/docs/anatomy) `Dockerfile`, add the following. Make sure you do this before you `COPY` your code. The idea is to implicitly use the default `USER root` since it needs permissions to create an `/opt/extensions` directory.
27+
Within your project or [Rails application's](https://lamby.custominktech.com/docs/anatomy) `Dockerfile`, add the following. Make sure you do this before you `COPY` your code. The idea is to implicitly use the default `USER root` since it needs permission to create an `/opt/extensions` directory.
2828

2929
```dockerfile
3030
RUN gem install lambda_punch && lambda_punch install
3131
```
3232

33+
LambdaPunch uses the `LAMBDA_TASK_ROOT` environment variable to find your project's Gemfile. If you are using a provided AWS Runtime container, this should be set for you to `/var/task`. However, if you are using your own base image, make sure to set this to your project directory.
34+
35+
```dockerfile
36+
ENV LAMBDA_TASK_ROOT=/app
37+
```
38+
3339
Installation with AWS Lambda via the [Lamby](https://lamby.custominktech.com/) v4 (or higher) gem can be done using Lamby's `handled_proc` config. For example, appends these to your `config/environments/production.rb` file. Here we are ensuring that the LambdaPunch DRb server is running and that after each Lamby request we notify LambdaPunch.
3440

3541
```ruby

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /