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

TWE Design System: Docker live reload setup #550

Closed
3 of 6 tasks
joshfishman opened this issue Mar 27, 2024 · 16 comments
Closed
3 of 6 tasks

TWE Design System: Docker live reload setup #550

joshfishman opened this issue Mar 27, 2024 · 16 comments

Comments

@joshfishman
Copy link
Member

joshfishman commented Mar 27, 2024

Overview

We need to create a docker image and process for team members so it is easier join the project and start coding

Action Items

  • Create a feature branch in git
  • Setup a docker image with all dependencies
  • ensure .gitignore is setup properly
  • Ensure that the docker container live reloads sass and markdown changes to the local server
  • Add setup instructions to the Software Engineer wiki
  • Commit the docker image to the repo and create a PR

Resources/Instructions

How to create a docker image

@Brayheart
Copy link
Member

Brayheart commented Apr 23, 2024

Currently working on: Docker image needs to hot reload for local edit to populate.

Make sure MKdocs is running

@Brayheart
Copy link
Member

Updated the setup instructions

Just run docker run -p 8000:8000 -v $(pwd):/app {your-project-name}

@Brayheart
Copy link
Member

Updated contributing document

to include docker run -p 8000:8000 -v $(pwd):/app internship-website-design-system so people have the command to be able to edit the design system locally

@ExperimentsInHonesty ExperimentsInHonesty added Ready for product When the issue is ready for product team to review ready for dev lead labels May 9, 2024
@ExperimentsInHonesty
Copy link
Member

@Brayheart
Copy link
Member

@ExperimentsInHonesty I've removed the setup the microsite locally with docker page, that information has been put into the contributing file under the installation instructions.

@ExperimentsInHonesty
Copy link
Member

@joshfishman
Copy link
Member Author

these links need to be setup above

@aconstas
Copy link
Member

✅ fixed hyperlinks to correct pages
✅ deleted "How to Setup locally"
✅ removed references of linking Figma to GitHub since we are no longer doing that

@ExperimentsInHonesty ExperimentsInHonesty moved this to In progress (actively working) in P: TWE: Project Board Jun 10, 2024
@ExperimentsInHonesty ExperimentsInHonesty added the PBV: engineering all issue for the engineering team label Jun 10, 2024
@KC-skc KC-skc closed this as completed Jun 13, 2024
@github-project-automation github-project-automation bot moved this from In progress (actively working) to Done in P: TWE: Project Board Jun 13, 2024
@joshfishman
Copy link
Member Author

docker not properly reloading

@joshfishman joshfishman reopened this Aug 13, 2024
@github-project-automation github-project-automation bot moved this from Done to In progress (actively working) in P: TWE: Project Board Aug 13, 2024
@joshfishman joshfishman moved this from In progress (actively working) to Prioritized Backlog in P: TWE: Project Board Aug 13, 2024
@joshfishman joshfishman moved this from Prioritized Backlog to In progress (actively working) in P: TWE: Project Board Aug 13, 2024
@joshfishman
Copy link
Member Author

joshfishman commented Aug 13, 2024

@joshfishman
Copy link
Member Author

This is solved with my last commit to the design system repo

Updating docs with new docker account docker run -p 8000:8000 -v $(pwd):/docs ds

@github-project-automation github-project-automation bot moved this from In progress (actively working) to Done in P: TWE: Project Board Oct 9, 2024
@github-project-automation github-project-automation bot moved this from Done to In progress (actively working) in P: TWE: Project Board Oct 17, 2024
@joshfishman
Copy link
Member Author

Our Docker is running to build and display the site.
What we need to proceed with development is to setup the docker so that it complies Sass and has live reload on file change. This was working for me locally but when I pull down a fresh copy of repo it does not work.

@joshfishman joshfishman changed the title TWE Design System: Create Docker setup for microsite development TWE Design System: Docker live reload setup Oct 23, 2024
@joshfishman
Copy link
Member Author

This is working on my machine but will not work on my other devs machine. Their installs do not livereload or compile. I have mac os x one dev has mac one windows. When they start the site they cant reach it at 0.0.0.0, only localhost. I can see it at both addresses

@fyliu
Copy link
Member

fyliu commented Oct 23, 2024

I couldn't reproduce the problem on my windows machine.

The scss recompile and livereload both work correctly for me.

The commands I used from Josh are:

docker build -t ds .
docker run --rm -p 8000:8000 -v $(pwd):/docs ds

I added the --rm so it auto-removes the container after running it, but that doesn't affect the problem.

My steps to reproduce successful recompile and live reload:

  1. Open the browser to http://localhost:8000/internship-website-design-system/buttons/
  2. Open \docs\components\sass\components\_buttons.scss in an editor
  3. Change .btn-sm.font-size to 2rem;
  4. Save the file
  5. See the /docs/dist/main.css recompiled to a corresponding change
  6. See the Button text size updated to something large when it auto-reloads

Edited to be more to the point.

@ExperimentsInHonesty
Copy link
Member

@joshfishman the devops community says why not just use localhost? What is the functional difference for your developers?

@ExperimentsInHonesty
Copy link
Member

This has been solved. It was a cache issue for existing devs.

@github-project-automation github-project-automation bot moved this from In progress (actively working) to Done in P: TWE: Project Board Oct 31, 2024
@ExperimentsInHonesty ExperimentsInHonesty removed the Ready for product When the issue is ready for product team to review label Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment