https://github.com/okteto/react-getting-started
Get started with React and Okteto
https://github.com/okteto/react-getting-started
development docker kubernetes okteto react
Last synced: 5 months ago
JSON representation
Get started with React and Okteto
- Host: GitHub
- URL: https://github.com/okteto/react-getting-started
- Owner: okteto
- Created: 2020-05-06T19:05:36.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2021-05-31T12:31:54.000Z (over 4 years ago)
- Last Synced: 2025-03-03T02:34:04.863Z (7 months ago)
- Topics: development, docker, kubernetes, okteto, react
- Language: JavaScript
- Homepage: https://www.okteto.com
- Size: 1.86 MB
- Stars: 2
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
This repo shows you how to build a React-based application with Okteto Cloud.
> Okteto is compatible with any Kubernetes distribution. This guide uses Okteto Cloud to take advantage of automatic builds and deploys.
## Prerequisites
1. [Install the Okteto CLI](https://okteto.com/docs/getting-started/installation)
1. Run `okteto login` to create your free Okteto Cloud account and download the required credentials and certificates.## Launch your development environment
The `okteto.yml` manifest is configured to use the first stage of the `Dockerfile` as the development environment.To deploy it:
```
okteto up
```To build the development environment and then deploy it (e.g. if you want to add more dependencies), run:
```
okteto up --build
```## Develop your Application
`okteto up` will give you a terminal to your remote development environment. This environment is just like a regular one, except that it's running directly in Okteto Cloud. This means that it's fully integrated with the rest of your namespace.
To start your react application, simply run:
```
yarn start
```This will start React's dev server on hot reload mode. Every time you make a change in the local version of your files, the files will be synchronized to your remote development environment and auto reloaded.
## Deploy your production image
The `Dockerfile` is configured to give you a minimal image for production. In this case, the image only contains the build assets, served by nginx.
To deploy your react application in Okteto Cloud, simply run:
```
okteto push
````okteto` push will automatically build, generate manifests, deploy and/or update your react application.