GithubHelp home page GithubHelp logo

theziko1 / dailymoodtracker Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 106 KB

L'objectif de cette application est de permettre aux utilisateurs de rapidement enregistrer leur humeur du jour à travers une interface web simple et intuitive.

JavaScript 10.96% Dockerfile 1.82% HTML 5.41% CSS 28.55% TypeScript 53.27%

dailymoodtracker's Introduction

Project logo

DailyMoodTracker

Status GitHub Issues GitHub Pull Requests License


Déploiement d'une Application React avec Tests sur Docker

📝 Table of Contents

🧐 About

L'objectif de cette application est de permettre aux utilisateurs de rapidement enregistrer leur humeur du jour à travers une interface web simple et intuitive.

🏁 Getting Started

DailyMoodTracker sera une application widget pouvant être intégrée à n'importe quelle page web, offrant aux utilisateurs un moyen rapide et facile de suivre leur état émotionnel sur une base quotidienne. Utilisant React pour le développement frontend, Docker pour la conteneurisation, et Jest pour les tests unitaires, vous développerez une application centrée sur la facilité d'utilisation, l'accessibilité, et la simplicité de déploiement.

prérequis

Ce dont vous avez besoin pour installer le logiciel et comment les installer.

npm install

Installing

Une série d’exemples étape par étape qui vous expliquent comment faire fonctionner un environnement de développement.

Dites quelle sera l’étape

npm i dependencies 

🎈 Usage

Pour démarer l'application :

npm run dev

Containerizing a React Application with Docker

Ce guide vous explique les étapes à suivre pour mettre en conteneur une application React à l’aide de Docker.

prérequis

Docker installé sur votre système. Vous pouvez télécharger et installer Docker depuis https://www.docker.com/products/docker-desktop.

- Étapes

Créez votre application React pour la production : Avant de conteneuriser votre application React, assurez-vous qu’elle est conçue pour la production. Vous pouvez le faire en exécutant :

npm run build

Écrivez un Dockerfile : Créez un fichier nommé Dockerfile dans le répertoire racine de votre projet et ajoutez le contenu suivant :

# Use Node.js v14 as base image
FROM node:14 as build

# Set working directory
WORKDIR /app

# Copy package.json and package-lock.json to the container
COPY package.json package-lock.json ./

# Install dependencies
RUN npm install --production

# Copy all files from current directory to the container
COPY . .

# Build the React app
RUN npm run build

# Use Nginx as base image for serving the static files
FROM nginx:alpine

# Copy built files from the build stage to nginx web server
COPY --from=build /app/build /usr/share/nginx/html

# Expose port 80
EXPOSE 80

# Start Nginx when the container starts
CMD ["nginx", "-g", "daemon off;"]

Créer l’image Docker : Exécutez la commande suivante pour créer votre image Docker :

docker build -t my-react-app .

Exécuter un conteneur Docker à partir de l’image : Enfin, vous pouvez exécuter un conteneur Docker à partir de l’image que vous venez de créer :

docker run -d -p 8080:80 my-react-app

⛏️ Built Using

✍️ Authors

dailymoodtracker's People

Contributors

theziko1 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.