Open ErrorsAndGlitches opened 5 years ago
Going to start working on this.
Still need to figure out how commands are run using these.
Using EB extensions for running commands before/after service start:
Setting up the docker configuration:
Docker repo has been set up:
Installing eb CLI:
pip install --upgrade awsebcli
eb create
documentation:
Environment variables:
The meaning of upstream
in nginx configuration:
More information about upstream
and nginx configuration in general. Very thorough though I haven't read all of it, but skimmed the upstream
parts:
Elastic Beanstalk also supports hooks, which seem to overlap with ebextensions:
Issue was that EB parses the Dockerfile for the EXPOSE information.
May be able to use the second version of the Dockerrun.aws.json
Other notes:
What is the relationship between .ebextensions and hooks?
Interestingly, the EB Docker set up does not have a host to container port mapping (tested on Mac). This might point to an issue that I'll need to hunt through the hooks to understand. Alternatively, moving to V2 configuration is another option.
Fixing SSL MySQL issue:
Things to fix:
I'm also not 100% certain that the migrations happened. May need to change this to a hook (though, this doesn't require the service to be deployed so not sure what's up here).
I may have fixed the static files by overriding the sites-available file:
One issue was that it wasn't checked in so it wasn't getting deployed. After committing it, eb deploy
wasn't updating the file. It could have to do that the file is only deployed during the first initialization. Going to try that. If not, it may be worth looking into the code again. Here are some SO articles that might help:
The ebextensions approach only works for Java and Go platforms. WTF.
Fixed the static files by overwriting the sites-available file via ebextensions. Still having some trouble getting Auth0 to work, but I believe I have identified the issue in the settings logic. I have created some unit tests to verify and am testing in production now.
Figured out the Auth0 issue - it was because the database migration command did not specify the production settings and hence it was not creating the needed Auth0 tables.
When going through this tutorial:
Found that the code was taking the approach of a custom Auth0 integration, which I don't think is needed. I've switched it out to the default one and found that it was erroring on not getting email. I made the change to enable email and it works when running production model locally (not in Docker). Going to try in prod mode via docker, push, and redeploy.
It seems that running in DEBUG
mode, but with authentication on generates more logs. It shows that the rsa
module is missing.
A lot of links and references can be found in this issue: