Going by a recent tutorial on setting up AWS Elastic Beanstalk for Ruby deployment using Git, I just set up a Elastic Beanstalk environment from my CI server. However, the a
Remove the private github repos from your requirements.txt file and create a script to install them using environmental variables for usernames and passwords.
file: project-root/install-extra-requirements.sh
#!/bin/sh
source /opt/python/run/venv/bin/activate
python ".extra-requirements.py"
file: project-root/.extra-requirements.py
import os
def main():
github_username = os.environ['GITHUB_USERNAME']
github_password = os.environ['GITHUB_PASSWORD']
repository = "git+https://%s:%s@github.com/yourgithubrepo" % (github_username, github_password)
os.system("pip install %s" % repository)
if __name__ == '__main__':
main()
file: project-root/.ebextensions/002_container.config
container_commands:
01_install_extra_requirements:
command: './install-extra-requirements.sh'
Now you can just set GITHUB_USERNAME and GITHUB_PASSWORD as environmental variables in your elastic beanstalk environment.