diff --git a/react/jakeswestcoast/.gitignore b/.gitignore similarity index 71% rename from react/jakeswestcoast/.gitignore rename to .gitignore index 4d29575..0c43a1c 100644 --- a/react/jakeswestcoast/.gitignore +++ b/.gitignore @@ -1,5 +1,3 @@ -# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. - # dependencies /node_modules /.pnp diff --git a/Dockerfile b/Dockerfile index 3f219f3..1fe5047 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,14 +1,17 @@ -FROM python:3.10-slim +FROM node:16-alpine WORKDIR /app -COPY . /app +COPY package*.json ./ -RUN pip install --no-cache-dir -r requirements.txt +RUN npm install -EXPOSE 5000 +COPY . . -ENV FLASK_APP=app.py -ENV FLASK_ENV=development +RUN npm run build -CMD ["flask", "run", "--host=0.0.0.0"] +RUN npm install -g serve + +EXPOSE 3000 + +CMD ["serve", "-s", "build", "-l", "3000"] diff --git a/README.md b/README.md index 3cf639a..014dd99 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,7 @@ npm start 2. Install missing packages ``` npm install web-vitals +npm install react-router-dom ``` 3. Test changes/fixes with ``` diff --git a/docker-compose.yml b/docker-compose.yml index 92032c9..0c12918 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -3,13 +3,16 @@ networks: external: true services: - jakeswestcoast: + react-app: container_name: jakeswestcoast - networks: - - traefik build: . + volumes: + - .:/app + - /app/node_modules + environment: + - NODE_ENV=production labels: - - traefik.http.routers.league.rule=Host(`jakeswestcoast.com`) || Host(`www.jakeswestcoast.com`) - - traefik.http.routers.league.tls=true - - traefik.http.routers.league.tls.certresolver=lets-encrypt - - traefik.http.services.downloads.loadbalancer.server.port=5000 + - traefik.http.routers.jwc.rule=Host(`jakeswestcoast.com`) || Host(`www.jakeswestcoast.com`) + - traefik.http.routers.jwc.tls=true + - traefik.http.routers.jwc.tls.certresolver=lets-encrypt + - traefik.http.services.jwc.loadbalancer.server.port=3000 diff --git a/react/jakeswestcoast/package-lock.json b/package-lock.json similarity index 100% rename from react/jakeswestcoast/package-lock.json rename to package-lock.json diff --git a/react/jakeswestcoast/package.json b/package.json similarity index 100% rename from react/jakeswestcoast/package.json rename to package.json diff --git a/react/jakeswestcoast/public/favicon.ico b/public/favicon.ico similarity index 100% rename from react/jakeswestcoast/public/favicon.ico rename to public/favicon.ico diff --git a/react/jakeswestcoast/public/index.html b/public/index.html similarity index 100% rename from react/jakeswestcoast/public/index.html rename to public/index.html diff --git a/react/jakeswestcoast/public/logo192.png b/public/logo192.png similarity index 100% rename from react/jakeswestcoast/public/logo192.png rename to public/logo192.png diff --git a/react/jakeswestcoast/public/logo512.png b/public/logo512.png similarity index 100% rename from react/jakeswestcoast/public/logo512.png rename to public/logo512.png diff --git a/react/jakeswestcoast/public/manifest.json b/public/manifest.json similarity index 100% rename from react/jakeswestcoast/public/manifest.json rename to public/manifest.json diff --git a/react/jakeswestcoast/public/robots.txt b/public/robots.txt similarity index 100% rename from react/jakeswestcoast/public/robots.txt rename to public/robots.txt diff --git a/react/jakeswestcoast/README.md b/react/jakeswestcoast/README.md deleted file mode 100644 index 58beeac..0000000 --- a/react/jakeswestcoast/README.md +++ /dev/null @@ -1,70 +0,0 @@ -# Getting Started with Create React App - -This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app). - -## Available Scripts - -In the project directory, you can run: - -### `npm start` - -Runs the app in the development mode.\ -Open [http://localhost:3000](http://localhost:3000) to view it in your browser. - -The page will reload when you make changes.\ -You may also see any lint errors in the console. - -### `npm test` - -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. - -### `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! - -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/requirements.txt b/requirements.txt deleted file mode 100644 index 96780c6..0000000 --- a/requirements.txt +++ /dev/null @@ -1,2 +0,0 @@ -Flask==3.0.3 - diff --git a/react/jakeswestcoast/src/App.css b/src/App.css similarity index 100% rename from react/jakeswestcoast/src/App.css rename to src/App.css diff --git a/react/jakeswestcoast/src/App.js b/src/App.js similarity index 100% rename from react/jakeswestcoast/src/App.js rename to src/App.js diff --git a/react/jakeswestcoast/src/App.test.js b/src/App.test.js similarity index 100% rename from react/jakeswestcoast/src/App.test.js rename to src/App.test.js diff --git a/react/jakeswestcoast/src/index.css b/src/index.css similarity index 100% rename from react/jakeswestcoast/src/index.css rename to src/index.css diff --git a/react/jakeswestcoast/src/index.js b/src/index.js similarity index 100% rename from react/jakeswestcoast/src/index.js rename to src/index.js diff --git a/react/jakeswestcoast/src/logo.svg b/src/logo.svg similarity index 100% rename from react/jakeswestcoast/src/logo.svg rename to src/logo.svg diff --git a/react/jakeswestcoast/src/reportWebVitals.js b/src/reportWebVitals.js similarity index 100% rename from react/jakeswestcoast/src/reportWebVitals.js rename to src/reportWebVitals.js diff --git a/react/jakeswestcoast/src/setupTests.js b/src/setupTests.js similarity index 100% rename from react/jakeswestcoast/src/setupTests.js rename to src/setupTests.js diff --git a/static/index.css b/static/index.css deleted file mode 100644 index 8e00f07..0000000 --- a/static/index.css +++ /dev/null @@ -1,44 +0,0 @@ -html, body { - margin: 0; - padding: 0; - height: 100%; - font-family: 'Arial', sans-serif; -} - -.image-background { - position: relative; - height: 100vh; - overflow: hidden; -} - -img { - position: absolute; - top: 50%; - left: 50%; - min-width: 100%; - min-height: 100%; - transform: translate(-50%, -50%); - object-fit: cover; - z-index: -1; -} - -.content { - position: absolute; - top: 50%; - left: 50%; - transform: translate(-50%, -50%); - text-align: center; - color: white; - text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.8); -} - -h1 { - font-size: 4rem; - margin: 0; -} - -p { - font-size: 1.5rem; - margin-top: 10px; -} - diff --git a/static/jakeswestcoast_warm_logo_square.png b/static/jakeswestcoast_warm_logo_square.png deleted file mode 100644 index ad9c66a..0000000 Binary files a/static/jakeswestcoast_warm_logo_square.png and /dev/null differ diff --git a/templates/about.html b/templates/about.html deleted file mode 100644 index 6f0c884..0000000 --- a/templates/about.html +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - Jake's West Coast | About - - - - -
- Home -
-
-
-

Who Am I?

-
-
- -
-
-
-

I'm Jake, a rider from the Bay Area. I enjoy being in the mountains and riding new trails! Catch me riding in the Santa Cruz mountains on the weekends.

-

Check out my social media and Youtube to see what I've been riding! Links are below.

- - -
-
-
-
-
- - diff --git a/templates/index.html b/templates/index.html deleted file mode 100755 index 7cbb90a..0000000 --- a/templates/index.html +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - Jake's West Coast | Home - - - - - -
-
- About -
- Jakeswestcoast -
-

Jake's West Coast

-

My Mountaineering Diary

-
-
- -