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

Update Docker Compose Dev With New Features #1443

Open
3 tasks
akibrhast opened this issue Apr 23, 2021 · 6 comments
Open
3 tasks

Update Docker Compose Dev With New Features #1443

akibrhast opened this issue Apr 23, 2021 · 6 comments
Labels
Complexity: Large Dependency An issue is blocking the completion or starting of another issue Feature: Infrastructure For changes on site technical architecture manual dependency release role: back end/devOps Tasks for back-end developers size: 2pt Can be done in 7-12 hours

Comments

@akibrhast
Copy link
Member

akibrhast commented Apr 23, 2021

Dependency

A person who has risen to the merge team and who is experiencing docker reloading the entire code base on every change and who wants to take this issue on. see notes

Overview

We need to update our docker-compose file such that it is dynamic and based off off .env file settings.

Action Items

  • Docker Compose Should have the following variables coming from an .env file such that they are configurable.

    • The image key
    • The output ports value
  • The docker compose should also go through some additional pre-build steps before it runs jekyll serve. These pre build steps should be configured in such a way that it is possible to turn on/off an individual pre-build step. At the moment, these steps includes:

  • For merge team: Once the PR related to this issue is merged and this issue is closed, please edit section 1.6.a in the contributing.md file accordingly.

Resources/Instructions

More details available in issue ##1273

@akibrhast akibrhast added role: back end/devOps Tasks for back-end developers Complexity: Large labels Apr 23, 2021
@sayalikotkar sayalikotkar added the Feature Missing This label means that the issue needs to be linked to a precise feature label. label Jun 20, 2021
@akibrhast akibrhast added Feature: Infrastructure For changes on site technical architecture and removed Feature Missing This label means that the issue needs to be linked to a precise feature label. labels Jul 2, 2021
@ExperimentsInHonesty ExperimentsInHonesty added the Dependency An issue is blocking the completion or starting of another issue label Jul 31, 2021
@ExperimentsInHonesty
Copy link
Member

I think this issue will never get worked on if it sits in the icebox but no one knows about it. Can we add something to the CONTRIBUTING.md so that if anyone has a problem with it AND they rise to the level of merge team, they can take on this issue.

@Providence-o Providence-o removed the Dependency An issue is blocking the completion or starting of another issue label Jan 29, 2022
@Providence-o Providence-o added the Dependency An issue is blocking the completion or starting of another issue label Feb 5, 2022
SAUMILDHANKAR added a commit that referenced this issue May 6, 2022
Added note related to issue #1443 in section 1.6.a
@juliansmith0
Copy link
Member

per 1.6.a in CONTRIBUTING.md: "NOTE: If it takes longer than 2 minutes to build your website using docker-compose up, please let the technical leads know about this and add your website build time in a comment to #1443. Also, once you are part of the merge team, you can work on #1443 and fix it (if you want)."

running docker-compose up successfully for the first time did indeed take longer than 2 minutes for me. Total, it took 16.5 minutes. Here's the full output with regards to time taken:

⠿ hfla_site Pulled 440.3s
⠿ cbdbe7a5bc2a Pull complete 1.2s
⠿ aa8ae8202b42 Pull complete 1.3s
⠿ b21786fe7c0d Pull complete 1.3s
⠿ 68296e6645b2 Pull complete 53.6s
⠿ 6b1c37303e2d Pull complete 53.6s
⠿ d603698ce36b Pull complete 438.1s
[+] Running 1/1
⠿ Container hfla_site Recreated 0.7s

@SAUMILDHANKAR
Copy link
Member

@juliansmith0 Thanks for adding your comment regarding the time taken to run docker-compose up for the first time. Just wanted to check if the long time taken was only for the first time or if the time improved considerably during your subsequent attempts to run docker-compose up. Please let us know. Thanks again for sharing.

@SAUMILDHANKAR SAUMILDHANKAR added the size: 2pt Can be done in 7-12 hours label Jun 19, 2022
@ExperimentsInHonesty ExperimentsInHonesty added this to the 08. Team workflow milestone Mar 5, 2023
@fyliu
Copy link
Member

fyliu commented Jul 31, 2023

I'm working with a docker setup recently and just want to leave a comment while I have things fresh in my mind.

Resource

Comments on the pre-build steps

  • I know it might be obvious, but they could go into the command value in the compose file. They can be set to conditionals depending on env variables. This way, they will run before jekyll serve like the action item wants.
  • It might be better to have a separate script to run those pre-build steps since I assume the docker-compose process stays running at the jekyll server .... --livereload ... command. One would have to stop and rerun the container to run the pre-build steps again with this setup. This is why I'm suggesting running them separately so that the jekyll server can stay running.
  • Another maybe cleaner way is to have another docker-compose "service" running parallel to "hfla_site" jekyll one to have it watch for code changes and run the linters. This way, both are running but in separate containers. docker-compose up will show outputs from both containers. Or they can be started or monitored separately using the relevant docker-compose commands. This is basically using another Dockerfile.lint that runs the linters.

@liamtirney
Copy link
Member

per 1.6.a in CONTRIBUTING.md: "NOTE: If it takes longer than 2 minutes to build your website using docker-compose up, please let the technical leads know about this and add your website build time in a comment to #1443. Also, once you are part of the merge team, you can work on #1443 and fix it (if you want)."

running 'docker-compose up' successfully for the first time took longer than 2 minutes for me. It took about 5 minutes. Here's a snapshot of my terminal:
long_docker_build

@kevin31yu
Copy link
Member

per 1.6.a in CONTRIBUTING.md: "NOTE: If it takes longer than 2 minutes to build your website using docker-compose up, please let the technical leads know about this and add your website build time in a comment to #1443. Also, once you are part of the merge team, you can work on #1443 and fix it (if you want)."

Took up to 4 minutes by running 'docker-compose up'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Complexity: Large Dependency An issue is blocking the completion or starting of another issue Feature: Infrastructure For changes on site technical architecture manual dependency release role: back end/devOps Tasks for back-end developers size: 2pt Can be done in 7-12 hours
Projects
Development

No branches or pull requests

9 participants