-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Still erroring out, but I am a bit stuck #43
base: master
Are you sure you want to change the base?
Conversation
So cool! I will check this out tomorrow. |
This is awesome, it builds my 30+ minute instructions in a few minutes! Commenting the diff with some fixes and workarounds |
- RABBITMQ_DEFAULT_USER=jp | ||
- RABBITMQ_DEFAULT_PASS=admin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Elsewhere it looks for these without "DEFAULT" - so changing to:
environment:
- RABBITMQ_USER=jp
- RABBITMQ_PASS=admin
seemed to resolve some of the errors
@@ -23,4 +23,4 @@ export CERT_PATH=test/cert/cert.crt | |||
export KEY_PATH=test/cert/private.key | |||
export API_RESPONSE_KEY=xS5MqJ6N9CyH-hvqAGrmBVAxFMOyauMpdrdqCZa1eqo= | |||
export IP_AND_PORT=$(hostname -I | awk '{print $1}'):5000 | |||
./venv/bin/uwsgi --http 0.0.0.0:5000 --gevent 100 --wsgi-file wsgi.py --callable app | |||
./venv/bin/uwsgi --http 0.0.0.0:5001 --gevent 100 --wsgi-file wsgi.py --callable app |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems like in the docker environment a python venv is not needed. So changing this line to uwsgi --http 0.0.0.0:5001 --gevent 100 --wsgi-file wsgi.py --callable app
seems to have it find uwsgi. pip installs it someplace in path luckily!
./run-wsgi-dev | ||
./run-io-worker | ||
./run-cpu-worker |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On the actual server these are run each as a separate sytemd process. Thus the instructions to run them each in a separate terminal.
This is all a bit misleading - the core of the app will work with just running the uwsgi server. The io and cpu workers process incoming data from PGE's servers - a work around to use multiple cores with python.
I'll also need to look for the flask entry point.
TLDR most devs would rather run the flask development server and not worry about the celery workers. I added these scripts so that I could simulate the live server - in fact, it basically IS the production setup, just run from terminals instead of systemd.
With this the uwsgi server runs and I am able to go to Docker Desktop and click view in browser. I tried with ports 5000 and 5001, I think either is OK. Unless docker is way more magic than I understand, I would think that the I was feeling spicy so I changed the init.sh to:
Which ends up revealing some weird celery errors. |
The script |
If you'd like to run this and see if you recognize the errors, I think I'm getting close, but also think that the fact that celery workers are going to run in the background will cause them to be ignored, and for the container to exit.