File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 5757 env :
5858 LOCALSTACK_AUTH_TOKEN : ${{ secrets.LOCALSTACK_AUTH_TOKEN }}
5959 run : |
60- pip install localstack localstack
60+ pip install localstack
6161 docker pull localstack/localstack-pro
62+ localstack auth set-token $LOCALSTACK_AUTH_TOKEN
6263 localstack start -d
6364 localstack wait -t 30
6465
Original file line number Diff line number Diff line change @@ -27,6 +27,9 @@ const TYPESCRIPT_PLUGIN_BUILD_DIR_BUILTIN_ESBUILD = '.serverless/build'; //TODO
2727// Default AWS endpoint URL
2828const DEFAULT_AWS_ENDPOINT_URL = 'http://localhost:4566' ;
2929
30+ // Default LocalStack Image
31+ const LOCALSTACK_PRO_IMAGE = 'localstack/localstack-pro' ;
32+
3033// Cache hostname to avoid unnecessary connection checks
3134let resolvedHostname = undefined ;
3235
@@ -425,6 +428,10 @@ class LocalstackPlugin {
425428 shouldRunDockerSudo ( ) {
426429 return ( this . config . docker || { } ) . sudo ;
427430 }
431+
432+ getLocalstackImage ( ) {
433+ return ( this . config . image || process . env . IMAGE_NAME || LOCALSTACK_PRO_IMAGE ) ;
434+ }
428435
429436 getStageVariable ( ) {
430437 const customConfig = this . serverless . service . custom || { } ;
@@ -538,6 +545,10 @@ class LocalstackPlugin {
538545 if ( this . shouldRunDockerSudo ( ) ) {
539546 env . DOCKER_CMD = 'sudo docker' ;
540547 }
548+
549+
550+ env . IMAGE_NAME = this . getLocalstackImage ( ) ;
551+
541552 const options = { env : env , maxBuffer } ;
542553 return exec ( 'localstack start -d' , options )
543554 . then ( getContainer )
You can’t perform that action at this time.
0 commit comments