Update README + docker

This commit is contained in:
Danylo Dotsenko 2024-07-12 11:04:16 -04:00
parent 16df6cfa1b
commit 9645778c77
5 changed files with 42 additions and 65 deletions

View File

@ -4,12 +4,12 @@ WORKDIR /usr/src/app
COPY package*.json ./ 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 . . COPY . .
RUN npm install -g serve
RUN npm run build RUN npm run build
EXPOSE 3000 EXPOSE 3000

View File

@ -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.\ // Run local hot-reload instance.
Open [http://localhost:3000](http://localhost:3000) to view it in your browser. npm run start
```
The page will reload when you make changes.\ ### Release
You may also see any lint errors in the console. * 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.\ // Serve built directory.
See the section about [running tests](https://facebook.github.io/create-react-app/docs/running-tests) for more information. 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.\ ### Change Log
Your app is ready to be deployed! ##### 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)

11
docker-compose.yml Normal file
View File

@ -0,0 +1,11 @@
version: '3'
services:
server-landing:
build: .
container_name: server-landing
restart: always
ports:
- "3000:3000"
volumes:
- .:/app
- /app/node_modules

6
package-lock.json generated
View File

@ -6194,9 +6194,9 @@
} }
}, },
"node_modules/caniuse-lite": { "node_modules/caniuse-lite": {
"version": "1.0.30001577", "version": "1.0.30001641",
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001577.tgz", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001641.tgz",
"integrity": "sha512-rs2ZygrG1PNXMfmncM0B5H1hndY5ZCC9b5TkFaVNfZ+AUlyqcMyVIQtc3fsezi0NUCk5XZfDf9WS6WxMxnfdrg==", "integrity": "sha512-Phv5thgl67bHYo1TtMY/MurjkHhV4EDaCosezRXgZ8jzA/Ub+wjxAvbGvjoFENStinwi5kCyOYV3mi5tOGykwA==",
"funding": [ "funding": [
{ {
"type": "opencollective", "type": "opencollective",

View File

@ -17,7 +17,7 @@
}, },
"scripts": { "scripts": {
"start": "react-scripts start", "start": "react-scripts start",
"build": "react-scripts build", "build": "GENERATE_SOURCEMAP=false react-scripts build",
"test": "react-scripts test", "test": "react-scripts test",
"eject": "react-scripts eject" "eject": "react-scripts eject"
}, },