-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.dev.yml
More file actions
50 lines (46 loc) · 1.16 KB
/
docker-compose.dev.yml
File metadata and controls
50 lines (46 loc) · 1.16 KB
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
49
50
services:
frontend:
build:
context: ./interncomp-frontend
dockerfile: Dockerfile.dev
volumes:
- ./interncomp-frontend:/app
- /app/node_modules # Avoid overwriting node_modules
ports:
- '4000:4000' # Frontend is being set at port 4000 in vite.config.js
networks:
- app-network
db:
container_name: pg_db
image: postgres:15-alpine
restart: always
environment:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: password
POSTGRES_DB: interncomp-database
ports:
- '5433:5432' # Map some automatically chosen machine port to container's PostgreSQL port 5432
volumes:
- pgdata:/var/lib/postgresql/data
networks:
- app-network
backend:
build:
context: ./interncomp-backend
dockerfile: Dockerfile.dev
depends_on:
- db
volumes:
- ./interncomp-backend:/app
- /app/node_modules # Avoid overwriting node_modules
ports:
- '3000:3000' # Map backend container's port 3000 to local port 3000
env_file:
- ./interncomp-backend/.env
networks:
- app-network
networks:
app-network:
driver: bridge
volumes:
pgdata: