forked from pawelmalak/snippet-box
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.simple.yml
More file actions
47 lines (43 loc) · 1.11 KB
/
docker-compose.simple.yml
File metadata and controls
47 lines (43 loc) · 1.11 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
version: '3.8'
services:
backend:
image: node:16-alpine
container_name: SnippetBox2-backend-dev
working_dir: /app
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: sh -c "npm install && npm install -g nodemon ts-node && npm run dev:server"
networks:
- SnippetBox2-network
frontend:
image: node:16-alpine
container_name: SnippetBox2-frontend-dev
working_dir: /app
user: "1000:1000"
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: sh -c "npm install && npm start"
networks:
- SnippetBox2-network
depends_on:
- backend
networks:
SnippetBox2-network:
driver: bridge
volumes:
node_modules_backend:
node_modules_frontend: