forked from pawelmalak/snippet-box
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdocker-compose.working.yml
More file actions
44 lines (41 loc) · 1.09 KB
/
docker-compose.working.yml
File metadata and controls
44 lines (41 loc) · 1.09 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
services:
backend:
image: node:18-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=development_secret_change_in_production
- JWT_EXPIRES_IN=15m
command: sh -c "rm -f /app/data/db.sqlite3 && npm install && npm install -g nodemon ts-node && npm run dev:server"
networks:
- SnippetBox2-network
frontend:
image: node:18-alpine
container_name: SnippetBox2-frontend-dev
working_dir: /app
ports:
- "3000:3000"
volumes:
- ./client:/app
environment:
- REACT_APP_API_URL=http://backend:5000/api
- CHOKIDAR_USEPOLLING=true
- npm_config_unsafe_perm=true
- ESLINT_NO_CACHE=true
command: sh -c "npm install --cache=/tmp/.npm && ESLINT_NO_CACHE=true npm start"
networks:
- SnippetBox2-network
depends_on:
- backend
networks:
SnippetBox2-network:
driver: bridge
volumes:
node_modules_backend: