Configurer Docker avec un Dockerfile et mettre à jour docker-compose.yml pour utiliser la construction d'image

This commit is contained in:
2025-03-10 14:46:29 +01:00
parent 7785bfa10f
commit 39a7b897bf
3 changed files with 70 additions and 47 deletions

View File

@@ -1,6 +1,8 @@
services:
timelapse-api:
image: node:latest
build:
context: . # Chemin vers le répertoire contenant le Dockerfile
dockerfile: Dockerfile # Nom du Dockerfile, par défaut c'est "Dockerfile"
container_name: timelapse-api
ports:
- "8053:3000"
@@ -11,7 +13,6 @@ services:
- NODE_VERSION=22.9.0
- YARN_VERSION=1.22.22
working_dir: /backend
command: /bin/bash -c "npm install && npm run dev"
restart: always
networks:
- bridge