diff --git a/Dockerfile b/Dockerfile index 41d1df8..c984592 100644 --- a/Dockerfile +++ b/Dockerfile @@ -4,12 +4,12 @@ WORKDIR /usr/src/app COPY package*.json ./ -RUN npm install +RUN npm install serve -g +# Assuming build will be used for release, not development; otherwise, remove the production-only flag. +RUN npm install --only=production COPY . . -RUN npm install -g serve - RUN npm run build EXPOSE 3000 diff --git a/README.md b/README.md index 58beeac..26c9732 100644 --- a/README.md +++ b/README.md @@ -1,70 +1,36 @@ -# Getting Started with Create React App +# Server home landing page -This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). +This repository is a (primitive) base landing page for my personal homepage. +Built in ReactJS with no other non-pertinent assets. -## Available Scripts +## Build & Run: -In the project directory, you can run: -### `npm start` +### Development +``` +// Install dependencies. +npm install -Runs the app in the development mode.\ -Open [http://localhost:3000](http://localhost:3000) to view it in your browser. +// Run local hot-reload instance. +npm run start +``` -The page will reload when you make changes.\ -You may also see any lint errors in the console. +### Release +* Dockerized option is also available. +``` +// Install prod-only dependencies. +npm install --only=production -### `npm test` +// Generate build folder. +npm run build -Launches the test runner in the interactive watch mode.\ -See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. +// Serve built directory. +serve -s build +``` +--- -### `npm run build` -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! +### Change Log +##### 2024-07-11 - Final base build concluded + live release. -See the section about [deployment](https://facebook.github.io/create-react-app/docs/deployment) for more information. - -### `npm run eject` - -**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. - -## Learn More - -You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). - -To learn React, check out the [React documentation](https://reactjs.org/). - -### Code Splitting - -This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting) - -### Analyzing the Bundle Size - -This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size) - -### Making a Progressive Web App - -This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app) - -### Advanced Configuration - -This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration) - -### Deployment - -This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment) - -### `npm run build` fails to minify - -This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify) diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..803291e --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,11 @@ +version: '3' +services: + server-landing: + build: . + container_name: server-landing + restart: always + ports: + - "3000:3000" + volumes: + - .:/app + - /app/node_modules \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index a9fb093..e25ac7f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6194,9 +6194,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001577", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001577.tgz", - "integrity": "sha512-rs2ZygrG1PNXMfmncM0B5H1hndY5ZCC9b5TkFaVNfZ+AUlyqcMyVIQtc3fsezi0NUCk5XZfDf9WS6WxMxnfdrg==", + "version": "1.0.30001641", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001641.tgz", + "integrity": "sha512-Phv5thgl67bHYo1TtMY/MurjkHhV4EDaCosezRXgZ8jzA/Ub+wjxAvbGvjoFENStinwi5kCyOYV3mi5tOGykwA==", "funding": [ { "type": "opencollective", diff --git a/package.json b/package.json index 7a8e418..0ec55fc 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,7 @@ }, "scripts": { "start": "react-scripts start", - "build": "react-scripts build", + "build": "GENERATE_SOURCEMAP=false react-scripts build", "test": "react-scripts test", "eject": "react-scripts eject" },