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

WIP: Consolidate dockerfiles #462

Draft
wants to merge 14 commits into
base: develop
Choose a base branch
from

Conversation

vasconsaurus
Copy link
Contributor

Description

trying to find common ground between dockerfiles

References: 4921, 5020

How has this been tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can verify the changes. Please describe whether or not you implemented automated tests.

Things to pay attention to during code review

Please describe parts of the change that require extra attention during code review, for example:

  • File FFFF, line LL: This refactoring does this and this. Is it consistent with how it’s implemented elsewhere?
  • Etc.

Checklist

  • I have performed a self-review of my own code
  • I have added unit and feature tests, if the PR implements a new feature or otherwise would benefit from additional testing
  • I have added regression tests, if the PR fixes a bug
  • I have added logging, exception reporting, and custom tracing with any additional information required for debugging
  • I considered secure coding practices when writing this code. Any security concerns are noted above.
  • I have commented my code in hard-to-understand areas, if any
  • I have made needed changes to the README
  • My changes generate no new warnings
  • If I added a third party module, I included a rationale for doing so and followed our current guidelines

@vasconsaurus vasconsaurus force-pushed the 4921-consolidate-dockerfiles branch 2 times, most recently from cc37481 to 937e638 Compare August 14, 2024 16:54
trying to find common ground between dockerfiles

Removed/changed – environment variables:
- MIN_INSTANCES=4 - Seems to have been used for passenger.
This is hardcoded in docker-entrypoint.sh (old start.sh) for puma
- MAX_POOL_SIZE=4 – Same as above.
- TERM=xterm – Seems to have been used with phantomjs
- PRODUCT=pender – We are unsure. We are keeping only APP.
- SERVER_PORT=8000 – We are moving this out.
– DEPLOYUSER=pender – We are keeping only APP.
- DEPLOYDIR=/app/pender – Change to ARG DIRPATH (it's used for other environments as well)

Removed/Changed
- RUN chown -R ${DEPLOYUSER}:www-data ${DEPLOYDIR}: Seems to have been used
when we were deploying with nginx.
- RUN echo "gem: --no-rdoc --no-ri" > ~/.gemrc:  Deprecated.
- MAINTAINER [email protected]: Deprecated.
Talked to Caio:
- He thinks we can hardcode this in config
- We also don't think profile.rb is necessary anymore
@vasconsaurus vasconsaurus force-pushed the 4921-consolidate-dockerfiles branch 2 times, most recently from 88ad39f to 2a40a62 Compare August 29, 2024 20:03
Now both docker build + run and docker compose build + compose up work
Ran the tests and only one crowdtangle test was failing.
graphicsmagick:
- we seem to have added `imagemagick` when we were using `chromeshot`:
[here](4f97370).
- and then to fix tests(?) we updated to `graphicsmagick`:
[here](2813f7e)

inotify-tools:
- was removed:
[commit](08746f8)

python:
- looks like it might have been used for youtube-dl:
[commit](bde6bb4)
also renamed files
removed environment variables not used during build time
add needed environment variables to docker-compose
Now we have one entrypoint file:
- pender local and deployed
- pender-background local and deployed
seems like it shouldn't have been in the production folder
and doesn't seem to be used anywhere
@vasconsaurus vasconsaurus force-pushed the 4921-consolidate-dockerfiles branch 3 times, most recently from ea40476 to 08c5bdf Compare August 30, 2024 18:49
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.

2 participants