-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
docker-compose.yml
50 lines (46 loc) · 1.21 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
48
49
50
version: '3.7'
# Use the network set up in the shared compose file.
networks:
default:
external: true
name: todo_${ENV}_default
services:
backend:
build:
context: .
target: development-backend
command: npx nodemon server.js
environment:
DATABASE_URL: postgres://postgres:postgres@postgres/${ENV}
PORT: 8080
external_links:
- todo_postgres_1:postgres
volumes:
- ./backend:/srv/todo/backend
- backend_node_modules:/srv/todo/backend/node_modules
- ./storage:/srv/todo/storage
- storage_node_modules:/srv/todo/storage/node_modules
frontend:
build:
context: .
target: development-frontend
command: npx webpack-dev-server
depends_on:
- backend
environment:
HOST: frontend
PORT: 8080
volumes:
- ./frontend:/srv/todo/frontend
- frontend_node_modules:/srv/todo/frontend/node_modules
# Use the node_modules volumes set up in the shared compose file.
volumes:
backend_node_modules:
name: todo_backend_node_modules
external: true
frontend_node_modules:
name: todo_frontend_node_modules
external: true
storage_node_modules:
name: todo_storage_node_modules
external: true