I have these container commands in an .ebextensions .config file:
container_commands:
download_geography_data_01:
command: "python scripts/download_geography_data.py"
download_geography_data_02:
command: "file /opt/python/current/app/data/geography/geography.sqlite"
And these execute perfectly - the second command is just there to put an entry in the log proving that the first script ran correctly and the file was created. I get a line like this in eb_activity.log, exactly as I would expect:
Completed activity. Result: /opt/python/current/app/data/geography/geography.sqlite: SQLite 3.x database
But 2 minutes later, it has my Python web server app is up and running and when it attempts to read that file, it fails:
IOError: geography data file not found. Path searched was /opt/python/current/app/data/geography/geography.sqlite
I then use eb ssh
to log in to my environment, and it's right - the file is not there at all. It has seemingly disappeared between the configuration stage and the execution stage.
Anybody have any idea what could be going wrong? Could it somehow be clearing this file away?
Aucun commentaire:
Enregistrer un commentaire