If you have trouble running this locally using npm
, I have included a containerized version using Docker
A note for Unix users: Some of the following commands may require sudo
depending on how you installed Docker and/or configured your installment. If at all possible, please look up how to configure Docker so sudo
is not required, as using Docker with elevated privileges is not recommended for new users
- Install Docker(link above)
- Clone repository
- Next,
cd
intoportfolio-site
or whatever you named it locally - Run the command
docker build -t <image name>:<tag> .
. This will build a Docker image locally. - Once
build
is finished, run withdocker run -it -p 3000:80 <image name>:<tag>
. Once this command hangs and you see the last stdout line of/docker-entrypoint.sh: Configuration complete; ready for start up
, your Docker container is up and running. You can then access it via the browser atlocalhost:3000
- Make sure you have the Docker engine and
docker-compose
binary installed. This comes separate from the Docker engine on Linux. If you installed Docker Desktop for MacOS and Linux, it should've come packaged with Docker. Link to docs fordocker-compose
- Clone repo
cd
intoportfolio-site
or whatever you named it locally- Next, run the command
docker-compose build
. - Finally, run the command
docker-compose up
, and you should see the normal React stdout to the terminal with some additional output from the Docker container preceding each line, but just disregard that. Once you see the 'Compiled successfully' out from React, you can go to your browser and view it atlocalhost:3000
In development mode, it will act like a normal React app built with CRA and hot reload any changes you make inside the src
directory. Changes to any files outside the src
directory will not be recognized and reload unless you configure the mounted volumes
section within app
within services
in the docker-compose.yml
config file. If you have any other issues, please consult the Docker Docs
This project was bootstrapped with Create React App.
In the project directory, you can run:
Runs the app in the development mode.
Open http://localhost:3000 to view it in the browser.
The page will reload if you make edits.
You will also see any lint errors in the console.
Launches the test runner in the interactive watch mode.
See the section about running tests for more information.
Builds the app for production to the build
folder.
It correctly bundles React in production mode and optimizes the build for the best performance.
The build is minified and the filenames include the hashes.
Your app is ready to be deployed!
See the section about deployment for more information.
Note: this is a one-way operation. Once you eject
, you can’t go back!
If you aren’t satisfied with the build tool and configuration choices, you can eject
at any time. This command will remove the single build dependency from your project.
Instead, it will copy all the configuration files and the transitive dependencies (webpack, Babel, ESLint, etc) right into your project so you have full control over them. All of the commands except eject
will still work, but they will point to the copied scripts so you can tweak them. At this point you’re on your own.
You don’t have to ever use eject
. The curated feature set is suitable for small and middle deployments, and you shouldn’t feel obligated to use this feature. However we understand that this tool wouldn’t be useful if you couldn’t customize it when you are ready for it.
You can learn more in the Create React App documentation.
To learn React, check out the React documentation.
This section has moved here: https://facebook.github.io/create-react-app/docs/code-splitting
This section has moved here: https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size
This section has moved here: https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app
This section has moved here: https://facebook.github.io/create-react-app/docs/advanced-configuration
This section has moved here: https://facebook.github.io/create-react-app/docs/deployment
This section has moved here: https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify