forked from pawelmalak/snippet-box
-
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.08 KB
/
docker-compose.dev.yml
File metadata and controls
50 lines (46 loc) · 1.08 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
version: '3.8'
services:
backend:
build:
context: .
dockerfile: Dockerfile.dev
target: backend
container_name: SnippetBox2-backend-dev
ports:
- "5000:5000"
volumes:
- .:/app
- node_modules_backend:/app/node_modules
- ./data:/app/data
environment:
- NODE_ENV=development
- JWT_SECRET=${JWT_SECRET:-development_secret_change_in_production}
- JWT_EXPIRES_IN=${JWT_EXPIRES_IN:-15m}
command: npm run dev:server
networks:
- SnippetBox2-network
frontend:
build:
context: .
dockerfile: Dockerfile.dev
target: frontend
container_name: SnippetBox2-frontend-dev
ports:
- "3000:3000"
volumes:
- ./client:/app
- node_modules_frontend:/app/node_modules
environment:
- REACT_APP_API_URL=http://localhost:5000/api
- CHOKIDAR_USEPOLLING=true
command: npm start
networks:
- SnippetBox2-network
depends_on:
- backend
networks:
SnippetBox2-network:
driver: bridge
volumes:
node_modules_backend:
node_modules_frontend: