Created
August 12, 2020 08:27
-
-
Save hmontazeri/38cd4cd339619991a810599d6e91c245 to your computer and use it in GitHub Desktop.
Deploy serverless app using docker (ffmpeg linux64 workaround)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if [ -x "$(command -v docker)" ]; then | |
echo "docker installed..." | |
echo "running deploy..." | |
docker run \ | |
-v $(pwd):/app \ | |
-v ~/.aws/credentials:/root/.aws/credentials \ | |
node:12 /bin/bash \ | |
-c "cd /app; npm i -g serverless; npm install; sls deploy" | |
else | |
echo "Install docker" | |
exit 1 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I had the problem that ffmpeg-installer uses current OS to choose the correct build for its ffmpeg binaries. Works fine if you build and run in the same env.
-> Problem building the node app on OSX and deploying to Linux (AWS Lambda) ENV didn't work, so I wrote this little shell script as a workaround