Skip to content

Commit a6b7383

Browse files
Update README.md
1 parent ebea5c2 commit a6b7383

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

README.md

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,31 @@ The geolambda image will most often be used an image used in the creation of a p
2121

2222
In either case, the files in the geolambda-seed directory in this repository can be used as a template to create your new Lambda function.
2323

24+
### Building your project
25+
26+
After editing the geolambda-seed template project, you first build a Docker image for your project with:
27+
28+
$ docker-compose build
29+
30+
And you can test it by running an interactive container:
31+
32+
$ docker-compose run base
33+
2434
### Deploying to Lambda
2535

26-
The geolambda imgaes contain two scripts for collecting and packaging all the files needed to deploy to a Lambda function (the zip file can either be uploaded directly to a Lambda function or added to S3).
36+
The geolambda imgaes contain scripts for collecting and packaging all the files needed to deploy to a Lambda function (the zip file can either be uploaded directly to a Lambda function or added to S3), and can be run with docker-compose commands, depending on if it's Python 2.7 or 3.6 that is needed:
37+
38+
$ docker-compose run package27
39+
40+
$ docker-compose run package36
41+
42+
The geolambda-seed project contains simple tests for the Lambda handler and will test it out on a base Docker container that represents the Lambda environment.
43+
44+
$ docker-compose run testpackage27
45+
46+
$ docker-compose run testpackage36
47+
48+
This will add all the needed library files and Python dependencies for your project (as defined in requirements.txt) into the lambda/ directory and create a zip package for deployment. To add in additional files (such as system library files you installed in your Dockerfile), you can add commands to the lambda/lambda-package.sh file.
2749

2850

2951
### geolambda Development

0 commit comments

Comments
 (0)