Skip to content
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

story/VOGRE-16 #25

Open
wants to merge 9 commits into
base: develop
Choose a base branch
from
Open

story/VOGRE-16 #25

wants to merge 9 commits into from

Conversation

rajvi-patel-22
Copy link
Member

@rajvi-patel-22 rajvi-patel-22 commented Nov 15, 2024

Guidelines for Pull Requests

If you haven't yet read our code review guidelines, please do so, You can find them here.

Please confirm the following by adding an x for each item (turn [ ] into [x]).

  • I have removed all code style changes that are not necessary (e.g. changing blanks across the whole file that don’t need to be changed, adding empty lines in parts other than your own code)
  • I am not making any changes to files that don’t have any effect (e.g. imports added that don’t need to be added)
  • I do not have any sysout statements in my code or commented out code that isn’t needed anymore
  • I am not reformatting any files in the wrong format or without cause.
  • I am not changing file encoding or line endings to something else than UTF-8, LF
  • My pull request does not show an insane amount of files being changed although my ticket only requires a few files being changed
  • I have added Javadoc/documentation where appropriate
  • I have added test cases where appropriate
  • I have explained any part of my code/implementation decisions that is not be self-explanatory

Please provide a brief description of your ticket

Fix Docker setup: VOGRE-16
Vogon needs to be run through supervisor

Are there any other pull requests that this one depends on?

Anything else the reviewer needs to know?

startup-prod.sh Outdated
@@ -0,0 +1,7 @@
#!/bin/sh

BASH_ENV=.env_app
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this actually working? It stopped working for me for some reason.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess there was an extra space after the APP_ROOT variable, which I have fixed:
APP_ROOT= -> APP_ROOT=

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use the line from the updated development version:
source .env_app

supervisord.conf Outdated
nodaemon=true

[program:vogon]
command=/vogon/startup.sh
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this does not seem right. That's the dev startup script, right? So it will still run the dev server. Instead Django should be run with Guniconr and supervisor would start gunicorn. It should look somewhat like this probably:
https://github.com/diging/amphora-docker/tree/main/scripts
(without the celery part and there might be updates to it). Maybe google gunicorn, django, and supervisor and see if you can find an update ot date example.

@jdamerow jdamerow closed this Nov 19, 2024
startup-prod.sh Outdated
@@ -0,0 +1,7 @@
#!/bin/sh

BASH_ENV=.env_app
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's use the line from the updated development version:
source .env_app

--workers $NUM_WORKERS \
--bind=0.0.0.0:8000 \
--log-level=info \
--log-file=-
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

log-file should log to a file.

startup-prod.sh Outdated
python -m pip install -r requirements.txt
python manage.py migrate
python manage.py collectstatic --noinput
exec supervisord -c /etc/supervisor/conf.d/supervisord.conf
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

supervisor should be installed as a service so you can start it as such (systemctl start supervisor I believe)

@jdamerow
Copy link
Member

jdamerow commented Jan 7, 2025

also there are conflicts

@jdamerow jdamerow closed this Jan 7, 2025
@diging-jenkins
Copy link
Collaborator

Can one of the admins verify this patch?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants