This is a Next.js project bootstrapped with create-next-app
.
First, run the development server:
npm run dev
Open http://localhost:3000 with your browser to see the result.
- Type a Star Wars character name into the search bar.
- Press the
ENTER
key on your keyboard or pressSearch
.
- Pull the Docker image: Run
docker pull ghcr.io/cparks1/star-wars-proxy-front-end:<latest>
, wherelatest
is the latest version of that package. - Run the Docker container: Run
docker run -p 3000:3000 ghcr.io/cparks1/star-wars-proxy-front-end:<latest>
, wherelatest
is the latest version of that package. - The Docker container should now be running and you can now access the front end via http://localhost:3000. If you want to stop running the Docker container, press
Ctrl + C
in the terminal where the container is running.
- From the root of the project directory, run the command
docker build -t star-wars-proxy-front-end .
- Find the image ID of the newly built Docker image via
docker image ls
. - Run
docker tag <image_id> ghcr.io/<github_username>/star-wars-proxy-front-end:1.0.0
, where 1.0.0 is the next version following semantic versioning specification. - Login to the GitHub container registry by running
docker login ghcr.io -u <github_username>
. The password it expects is your personal access token with Package write permissions. - Run
docker push ghcr.io/<github_username>/<image_name>:<tag>
.