-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
48 lines (48 loc) · 964 Bytes
/
docker-compose.yaml
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
37
38
39
40
41
42
43
44
45
46
47
48
services:
backend:
build:
context: ./back
dockerfile: Dockerfile
target: base
ports:
- "8080:8080"
volumes:
- ./back/src:/app/src
- ./back/nodemon.json:/app/nodemon.json
env_file:
- .env
command: npm run dev
depends_on:
- database
networks:
- mynetwork
frontend:
build: ./front
ports:
- "3001:3000"
volumes:
- ./front/src:/app/src
env_file:
- .env
stdin_open: true
tty: true
networks:
- mynetwork
database:
image: postgres:latest
container_name: database
restart: always
environment:
POSTGRES_DB: ${DB_DATABASE}
POSTGRES_USER: ${DB_USER}
POSTGRES_PASSWORD: ${DB_PASSWORD}
volumes:
- ./database-configuration.sql:/docker-entrypoint-initdb.d/database-configuration.sql
ports:
- "5432:5432"
env_file:
- .env
networks:
- mynetwork
networks:
mynetwork: