Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This comment was marked as outdated.
This comment was marked as outdated.
This comment has been minimized.
This comment has been minimized.
nuno-agostinho
left a comment
There was a problem hiding this comment.
Hi Andrés, thanks for the PR. The image is not being built in the GitHub Actions, do you know why?
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Super-linter summary
All files and directories linted successfully For more information, see the GitHub Actions workflow run Powered by Super-linter |
Super-linter summary
All files and directories linted successfully For more information, see the GitHub Actions workflow run Powered by Super-linter |
There was a problem hiding this comment.
Could you please cleanup this file for readability? For instance:
- Use newlines to separate different concepts.
- Each indentation should be of 4 spaces.
- Consecutive spaces should be one space only.
- Remove the first comment (
# checkov:skip=CKV_DOCKER_3) that should no longer be needed (hopefully).
| COPY . . | ||
| # Install frontend dependencies and prepare files | ||
| RUN mkdir -p static && chmod go+rx static && bun install && bun run build | ||
| CMD ["python", "manage.py", "collectstatic", "--noinput"] |
There was a problem hiding this comment.
This command is never run, so the static folder won't be populated with the latest files for production use by Django. Also, the app should still be served at the end of staging.
| CMD ["python", "manage.py", "collectstatic", "--noinput"] | |
| RUN python manage.py collectstatic --noinput | |
| CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"] |
That said, I don't think this approach will work. The static directory will be mounted and override anything built into the image. It makes more sense to move the bun and collecstatic commands to entrypoint.sh, as before. This also avoids bloating the image with the big dataset/species static assets.
We should test this thoroughly before trying in production.
| CMD curl -f http://localhost:8000/health/ || exit 1 | ||
|
|
||
| EXPOSE 8000 | ||
| CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"] |
There was a problem hiding this comment.
This command should only be used in staging. Since this image is specific for production, the last command should use gunicorn:
| CMD ["python", "manage.py", "runserver", "0.0.0.0:8000"] | |
| CMD ["gunicorn", "config.wsgi", "--bind", "0.0.0.0:8000"] |
Super-linter summary
All files and directories linted successfully For more information, see the GitHub Actions workflow run Powered by Super-linter |
The idea: running the python-dev container for development and the python one for production
Running on https://bca-dev.hpc.crg.es/