{"id":25556942,"url":"https://github.com/kevin-doolaeghe/docker-compose-website","last_synced_at":"2026-05-04T14:43:57.914Z","repository":{"id":181214584,"uuid":"367022584","full_name":"kevin-doolaeghe/docker-compose-website","owner":"kevin-doolaeghe","description":"Serveur Web (NodeJS / ReactJS / MySQL) fonctionnant sous Docker ","archived":false,"fork":false,"pushed_at":"2021-07-07T08:09:07.000Z","size":420,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2023-07-14T14:27:27.290Z","etag":null,"topics":["docker-compose","fullstack-development","learning-by-doing"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kevin-doolaeghe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2021-05-13T11:07:16.000Z","updated_at":"2023-07-14T14:27:38.419Z","dependencies_parsed_at":null,"dependency_job_id":"706aa9b5-54b9-40d8-8169-632a9521ff76","html_url":"https://github.com/kevin-doolaeghe/docker-compose-website","commit_stats":null,"previous_names":["kevin-doolaeghe/docker-compose-website"],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevin-doolaeghe%2Fdocker-compose-website","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevin-doolaeghe%2Fdocker-compose-website/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevin-doolaeghe%2Fdocker-compose-website/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kevin-doolaeghe%2Fdocker-compose-website/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kevin-doolaeghe","download_url":"https://codeload.github.com/kevin-doolaeghe/docker-compose-website/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239859557,"owners_count":19708861,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker-compose","fullstack-development","learning-by-doing"],"created_at":"2025-02-20T14:56:20.226Z","updated_at":"2026-02-23T22:30:18.900Z","avatar_url":"https://github.com/kevin-doolaeghe.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Serveur Web (Node.js / React.js / MySQL) fonctionnant sous Docker\n\n## Développement Web\n\n### 1. Installation de Node.js et du gestionnaire de paquets NPM\n\n```\nsudo apt install node npm\n```\n\n### 2. Backend - Node.js\n\nCréation du répertoire de développement :\n\n```\nmkdir back\ncd back\n```\n\nInitialisation du projet :\n\n```\nnpm init\nnpm install express mysql cors\ntouch index.js\n```\n\n### 3. Frontend - React.js\n\nInitialisation de l'application React :\n\n```\nnpx create-react-app front\ncd front\n```\n\nAjout du client HTTP Axios pour consommer des API :\n\n```\nnpm install axios\n```\n\n* Démarrer en mode développement :\n\n```\ncd front\nnpm start\n```\n\n* Déployer en production :\n\n```\ncd front\nnpm run build\n```\n\n```\nsudo npm install -g serve\nserve -s build\n```\n\n## Intégration avec docker-compose\n\n### 1. Installation\n\nTélécharger la dernière version stable de `docker-compose` :\n\n```\nsudo curl -L \"https://github.com/docker/compose/releases/download/1.29.1/docker-compose-$(uname -s)-$(uname -m)\" -o /usr/local/bin/docker-compose\n```\n\nAppliquer les droits d'exécution au binaire :\n\n```\nsudo chmod +x /usr/local/bin/docker-compose\n```\n\nCréer un lien dynamique vers le binaire :\n\n```\nsudo ln -s /usr/local/bin/docker-compose /usr/bin/docker-compose\n```\n\nTester l'installation :\n\n```\ndocker-compose --version\n```\n\n### 2. Configuration\n\nLes containers de l'applicatif à créer sont décrit dans le fichier `docker-compose.yml` :\n\n```\nsudo nano docker-compose.yml\n```\n\nLa configuration ci-dessous permet de créer deux conteneurs :\n- `web` : construit à partir du fichier Dockerfile présent dans le répertoire actuel\n- `redis` : une machine `alpine` issue de Docker Hub\n\n```\nversion: \"3.9\"\nservices:\n  web:\n    build: .\n    ports:\n      - \"5000:5000\"\n  redis:\n    image: \"redis:alpine\"\n```\n\n### 3. Utilisation\n\n* Créer \u0026 démarrer les services :\n\n```\ndocker-compose up\n```\n\n* Créer \u0026 démarrer les services en mode détaché (tâche de fond) :\n\n```\ndocker-compose up -d\n```\n\n* Arrêter \u0026 détruire les services :\n\n```\ndocker-compose down\n```\n\n* Arrêter \u0026 détruire les services et les volumes :\n\n```\ndocker-compose down -v\n```\n\n* Démarrer les services :\n\n```\ndocker-compose start\n```\n\n* Arrêter les services :\n\n```\ndocker-compose stop\n```\n\n* Détruire les services :\n\n```\ndocker-compose rm\n```\n\n* Détruire les images :\n\n```\ndocker-compose rmi\n```\n\n* Afficher les images crées :\n\n```\ndocker-compose images\n```\n\n* Afficher les containers démarrés :\n\n```\ndocker-compose ps\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkevin-doolaeghe%2Fdocker-compose-website","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkevin-doolaeghe%2Fdocker-compose-website","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkevin-doolaeghe%2Fdocker-compose-website/lists"}