https://github.com/ankeetmaini/docker-react-nginx
https://github.com/ankeetmaini/docker-react-nginx
Last synced: 9 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/ankeetmaini/docker-react-nginx
- Owner: ankeetmaini
- Created: 2020-05-05T10:02:12.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2023-01-06T05:02:48.000Z (over 3 years ago)
- Last Synced: 2025-09-23T13:02:06.118Z (9 months ago)
- Language: JavaScript
- Size: 4.29 MB
- Stars: 8
- Watchers: 1
- Forks: 2
- Open Issues: 20
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# dockerized react-nginx app
> initial boilerplate taken from CRA.
# running - dev
```
docker-compose up --build
```
> this will blow up the first time as there are no `node_modules`
- ssh into the container for node
```bash
docker-compose run app /bin/bash
yarn
# exit after yarn installs all the deps and run
# `docker-compose up`
```
# containers (check [docker-compose.yml](./docker-compose.yml))
- node container serving react
- nginx container proxing requests to node
# building docker images by hand
- app
```bash
docker build . -t docker-react
# run it
docker container run -it --rm --name react docker-react:latest
```
- nginx
```bash
cd nginx
docker build . -t docker-nginx
# run it
docker container run --publish 80:80 -it --rm docker-nginx:latest
```