Start command does not support running multiple commands
- Dominant language
- No language data
- Stars
- 301
- Forks
- 15
- PR merge metrics
- No merged PRs in 30d
Description
Trying to add multiple commands to the _Start command_ field in the web console gives unexpected results. Adding multiple commands to the _Build command_ is supported, so it's perhaps worth mentioning this limitation in the instructions above the _Start command_ field or adding support for multiple commands.
[Here's a minimal reproduction of the issue](https://github.com/TuureKaunisto/app-runner-minimal) (using apprunner.yaml instead of the web console for convenience)
expected output:
```
npm run migrate up && npm start
> app-runner-minimal@1.0.0 migrate
> ./migrate.sh up
Running migrate with the following arguments: "up"
```
got output:
```
> app-runner-minimal@1.0.0 migrate
> ./migrate.sh up && npm start
Running migrate with the following arguments: "up && npm start"
```
The reason we'd like to run two commands at startup is because [it seems that the environment variables defined in the web console are not available in the build phase](https://github.com/aws/apprunner-roadmap/issues/182) and therefore we needed to move the migrations to run during the _Start command_.
The issue can of course be fixed by creating another npm script that runs all the start commands (which is what we ended up doing while waiting for a better solution)
If we used the apprunner.yaml instead of the web console we would not have this need in the first place but in that case [we would not be able to run separate services for production and staging each with their own environment variables easily](https://github.com/aws/apprunner-roadmap/issues/177).
Contributor guide
Assessment
This issue has not been assessed yet.