Allow a init.d like dir to be used to execute scripts upon startup#1018
Allow a init.d like dir to be used to execute scripts upon startup#1018whummer merged 1 commit intolocalstack:masterfrom
Conversation
|
Could we please merge this? This is the way to do it. |
b487125 to
b46a2c4
Compare
|
@whummer any feedback on this PR? |
|
Sorry for the long delay on this PR. Looks great - only a minor comment. Is the pip installation required in the Dockerfile @shenie ? Thanks |
|
@shenie Using localstack for multiple projects on local with different scripts is not possible with the current solution. If we allow developers to send option in docker-compose, we can achieve different configurations for different projects. Any thought? I can implement & create PR if you want :) Regards, |
|
@gopinath-langote can I assume each project has its own docker-compose.yaml with localstack service? If so then you can do something like this to have each project perform any configurations the project needs by having scripts inside the project folder e.g. |
|
This way, we got dependancy on |
|
aws cli and awslocal cli are both available in the localstack image so your scripts can make use of them without installing it. |
|
@shenie Good. this will solve all the problems. Thanks |
|
I'm attempting to use this feature, but not seeing any logs in my docker-compose command that indicates it's creating an sqs queue. My script looks like this (in |
|
Hello @drewboardman, 2 things:
|
|
Ah also I have tested your setup, seems like the AWS_PROFILE is not needed. You could fix this with Output: Seeing your script, the SQS URL is wrongly declared (name default, you put integration) and the |
Thanks, I got the script running. However I have another issue. I'm running this container with |
|
@drewboardman Why don't you create the queue in the integration test instead of using such script? You can see some of them on https://github.com/localstack/localstack-java-utils |
That's what I originally was doing, however this creates a flakey scenario where the Queue gets created twice. I don't want test code to fail for reasons that aren't related to the code its supposed to test. |
Primarily this can be used to create resources on localstack which is why the aws cli is also installed so the script running inside container can use it.
It solves problems like #1014
Please refer to the contribution guidelines in the README when submitting PRs.