-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcompose.yaml
More file actions
36 lines (34 loc) · 931 Bytes
/
Copy pathcompose.yaml
File metadata and controls
36 lines (34 loc) · 931 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
services:
nuxt-app:
build:
context: .
dockerfile: Dockerfile
ports:
- "3000:3000"
environment:
# Variables d'environnement pour la connexion à la base de données
- DATABASE_HOST=db
- DATABASE_PORT=5432
- DATABASE_USER=postgres
- DATABASE_PASSWORD=postgres
- DATABASE_NAME=nuxtdb
command: "npm run dev"
depends_on:
- db
restart: unless-stopped
volumes:
- ./:/app # Pour que quand tu mets à jour le code via ton IDE, ça mette à jour le code sur ton container
- /app/node_modules # Empêcher le dossier node_modules d'être supprimé
db:
image: postgres:14-alpine
ports:
- "5432:5432"
environment:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=postgres
- POSTGRES_DB=nuxtdb
volumes:
- postgres_data:/var/lib/postgresql/data
restart: unless-stopped
volumes:
postgres_data: