Docker ready

This commit is contained in:
Yûki VACHOT 2021-11-02 04:52:34 +01:00
parent 4629b42b36
commit 740fa9ab7b
3 changed files with 20 additions and 2 deletions

18
backend/README.md Normal file
View file

@ -0,0 +1,18 @@
# Backend
# Run le backend
## 1 - Run with Docker
Depuis la racine du projet, lancez `docker compose up`.
## 2 - Run with MongoDB Docker Image & on terminal
- Lancer l'image de Docker MongoDB
- N'oubliez pas de `npm install` dans le dossier backend si pas déjà fait.
Puis
```
cd ./backend
node server.js
```

View file

@ -1,3 +1,3 @@
module.exports = { module.exports = {
url: "mongodb://127.0.0.1:27017/polynotfound" url: "mongodb://mongodb:27017/polynotfound"
}; };

View file

@ -22,7 +22,7 @@ services:
volumes: volumes:
- ./backend:/data/backend - ./backend:/data/backend
- ./backend/node_modules:/data/backend/node_modules - ./backend/node_modules:/data/backend/node_modules
- ./backend/keys:/data/backend/keys - ./backend/app:/data/backend/app
ports: ports:
- 3000:3000 - 3000:3000
depends_on: depends_on: