Prior to attending lab day complete the setup steps in this section (Setup Repo,
Install Needed Software, and Learn About Docker). NOTE: You may utilize your
favorite LLM or other web resources if you are stuck on something for this
particular prelab assignment.
The instructions below make the following assumptions:
- You will be working on the laptop you will be using for lab day.
- You have experience working with git from the command-line of your laptop.
- You have already install VS Code.
- You already have a functional GitHub account.
- On your laptop, open the command line and clone the course repo and
remove the remote called origin:
git clone https://github.com/tsergeant/w2_homework.git
cd w2_homework
git remote remove origin
- In GitHub, create your own private, empty repository by
visiting https://github.com/new.
- Name it
w2_homework
- Select Private
- Do NOT add a README, .gitignore, or license (leave it
completely empty)
After the repo is created, add the instructor (terrys@gmail.com) as
a collaborator on your repo.
- Back on your laptop, setup the remotes so that “origin” points to your
github repo and “upstream” points to the course repo:
git remote remove origin
git remote add origin https://github.com/<your-username>/w2_homework.git
git branch -M main
git push -u origin main
git remote add upstream https://github.com/tsergeant/w2_homework.git
- Verify that the remotes are correct with:
git remote -v
You should see:
origin git@github.com/<your-username>/w2_homework.git (fetch)
origin git@github.com/<your-username>/w2_homework.git (push)
upstream https://github.com/tsergeant/w2_homework.git (fetch)
upstream https://github.com/tsergeant/w2_homework.git (push)
- Push your initial copy to your private repository:
git push -u origin main
- Read the README.md
- found in the root directory of your repo to get
an understanding of the organization of the structure.
- Read docs/setup-guide.md
- found in the repo and follow all the instructions
for steps 1–6 listed in the document.
- Make sure it works
- by visiting localhost:3000 in your browser. When
you do you should see the message: “Server is running!”
Follow these learning steps:
- Visit: https://chatgpt.com
- In a new chat prompt, click the + icon to the left of the search box
and click the "Study and Learn" tool.
- Enter the following prompt: “Explain to me the meaning of this file:”
and then paste in the contents of the docker-compose.yml file in the
root of your repo.
- You will likely be asked about what you already know. If you've never
used docker before and you don't know what it is, then say that. Just
give an honest answer to the question.
- Then continue to interact with it until you have completed a line-by-line
explanation of the YAML file and you have a reasonably good understanding
of what it accomplishes.
- In the chat window click on the Share link at the top-right of the screen
and then click on the Copy Link icon. Then paste that link in the
comment section for this lab day assignment in Canvas.
During lab day follow these steps:
- Start by launching the services needed on your laptop to demonstrate
to the instructor that you can browse to localhost:5050 and
localhost:3000 to show that phpAdmin and the Hello World page are
working. The instructor will also check the link you posted in Canvas.
- In your hw01 directory, create a subdirectory named template.
The goal is for you to create a simple static application based on our
technology stack that you can use for starting new projects.
To accomplish this, watch these videos and follow along. Type what
the instructor types. When the instructor stops to test the code, do
the same in your environment. When you finish you will have a working
template that will be a starting point for the homework assignment.
- https://youtu.be/LlFw2vYKPuM
- https://youtu.be/qGZG_2qklh8
- https://youtu.be/pK7OccJS7tU
- https://youtu.be/0CzQBigtBc0
- Once you have the static site with two pages working in the template
folder, show the results to the instructor and then begin the homework
assignment.