-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yml
47 lines (45 loc) · 1.44 KB
/
docker-compose.yml
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
services:
server:
image: node:latest
working_dir: /app
volumes:
- ./server:/app
- server_node_modules:/app/node_modules
- sqlite_storage:/app/database
ports:
- "${BACKEND_PORT:-8080}:3000"
environment:
- NODE_ENV=${NODE_ENV:-development}
- FRONTEND_ORIGIN=${FRONTEND_ORIGIN:-http://localhost:3000}
- FRONTEND_PORT=${FRONTEND_PORT:-3000}
- BACKEND_PORT=${BACKEND_PORT:-8080}
- REACT_APP_BACKEND_URL=${REACT_APP_BACKEND_URL:-http://localhost:8080}
- GOOGLE_CLIENT_ID=${GOOGLE_CLIENT_ID}
- GOOGLE_CLIENT_SECRET=${GOOGLE_CLIENT_SECRET}
- GOOGLE_CALLBACK_URL=${GOOGLE_CALLBACK_URL:-http://localhost:8080/auth/google/callback}
- SESSION_SECRET=${SESSION_SECRET:-development-secret}
- FRONT_URL=${FRONT_URL:-http://localhost:3000}
command: >
sh -c "mkdir -p /app/database &&
npm install &&
npx ts-node src/scripts/seed.ts &&
npm run dev"
client:
image: node:latest
working_dir: /app
volumes:
- ./client:/app
- client_node_modules:/app/node_modules
ports:
- "${FRONTEND_PORT:-3000}:3000"
environment:
- WATCHPACK_POLLING=true
- NODE_ENV=${NODE_ENV:-development}
- REACT_APP_BACKEND_URL=${REACT_APP_BACKEND_URL:-http://localhost:8080}
command: >
sh -c "npm install &&
npm start"
volumes:
server_node_modules:
client_node_modules:
sqlite_storage: