pending CD on cloud. seems that i have to self host.
- Nginx as reverse proxy
- frontend of webapp in React
- backend of webapp with nodejs
- DB with postgres
- Caching with redis
- DB managment with Adminer
The health check session will ping the containers to check their availability
- Create a new React app:
npx create-react-app frontend
cd frontend- modify the app.js
- back in the root
mkdir backend && cd backend
npm init -y
npm install express pg cors dotenv body-parser-
initalize Postgres: 2 ways: - init.sql file in the root - migrate.js file managed by js. you have to modify the run script as well
-
install redis:
npm install redis -
Crate dockerfiles and docker compose.
-
build with:
docker-compose up --build
- DEvOps with Docker: Containers in development
- Basics of Orchestration: Development in containers
- Developer’s Perspective on Containerized Development Environments : A Case Study and Review of Gray Literature
- for Contenarized Development Environment:
- run this in the backend folder:
npm install --save-dev nodemon - bind mount settling
- activate polling
- update script at start directly in the package.json:
- front:
"scripts": { "start": "react-scripts start", "build": "react-scripts build", "test": "react-scripts test", "eject": "react-scripts eject" },
- back:
"scripts": { "test": "echo \"Error: no test specified\" && exit 1", "start": "node server.js", "dev": "nodemon server.js" },
- front:
- run this in the backend folder:
- Reverse proxy entrypoint:
http://localhost - React frontend will be available at
http://localhost:3000, - Node.js backend will run on
http://localhost:5000










