Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

letnull19A/nginx_vite_react_docker

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NGINX + React + Vite + TypeScript

This repo is my sample of React + Vite + TypeScript + Nginx + Docker + DockerCompose

Project Hierarchy Review

nginx_vite_react
├─ client
│ ├─ public
│ │ └─ vite.svg
│ ├─ src
│ │ ├─ assets
│ │ │ └─ react.svg
│ │ ├─ App.css
│ │ ├─ index.css
│ │ ├─ main.tsx
│ │ └─ vite-env.ts
│ ├─ .eslintrc.cjs
│ ├─ index.html
│ ├─ package.json
│ ├─ package.lock.json
│ ├─ tsconfig.json
│ ├─ tsconfig.node.json
│ └─ vite.config.json
├─ nginx
│ └─ nginx.conf
├─ .gitignore
├─ docker-compose.yml
└─ Readme.md

Installation (on host)

  • First change work directory
    $ cd client

  • Second install node_modules dependencies
    $ npm i

  • Third start dev server
    $ npm run dev

Run in Docker-compose

  • First input in terminan command
    $ docker image build -f Dockerfile -t vite_react .
    or sudo: # sudo docker image build -f Dockerfile -t vite_react .

  • Second input next
    $ docker compose -f docker-compose.yml -p serve up

  • Use it!

serve - is name of project started in docker-compose

author: @letnull19a

About

running react app, created by vite, in docker compose and integrated nginx web-server

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published
Morty Proxy This is a proxified and sanitized view of the page, visit original site.