This repository has been archived by the owner on Apr 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
/
docker-compose.yml
63 lines (52 loc) · 1.57 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
51
52
53
54
55
56
57
58
59
60
61
62
63
##############################
# Development Docker Compose #
##############################
# This is the version of the Docker Compose standard
version: '3.4'
services:
watch:
# Use the Vocabulary image
image: vocabulary:latest
# If the image is not found, build it
build:
context: .
dockerfile: docker/vocabulary/Dockerfile
# The user as which to run the container
user: vocab
# The command to run in the container
command: npm run watch
# Volumes attached to the container
volumes:
# Enable code changes to reflect in the container
- .:/codebase
# Ensures that host node_modules are not mounted
- node_modules:/codebase/node_modules
# Restart policy
restart: always
storybook:
# Use the Vocabulary image
image: vocabulary:latest
# If the image is not found, build it
build:
context: .
dockerfile: docker/vocabulary/Dockerfile
# The user as which to run the container
user: vocab
# The command to run in the container
command: npm run storybook
# Volumes attached to the container
volumes:
# Enable code changes to reflect in the container
- .:/codebase
# Ensures that host node_modules are not mounted
- node_modules:/codebase/node_modules
# Ports exposed on the host
ports:
# Map 8080 in the container to the same port on the host
- 8080:8080
# Restart policy
restart: always
volumes:
# Holds the node_modules directory
# Prevents the host node_modules from being mounted and used
node_modules: