-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdocker-compose.yaml
43 lines (39 loc) · 972 Bytes
/
docker-compose.yaml
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
version: '2'
services:
builder:
# builds dist/
build:
context: .
dockerfile: Dockerfile
entrypoint: ["npm", "run", "build"]
image: scicateditor:latest
ports: []
volumes:
- "./src:/app/src:ro"
- "./dist:/app/dist:rw"
# For dev you probably want to install npm locally and run `npm run serve`
devserver:
# runs webpack-dev-server
profiles: ["dev"]
build:
context: .
dockerfile: Dockerfile
image: scicateditor/latest
ports:
- "8080:8080"
volumes:
- "./src:/app/src"
- "./dist:/app/dist"
- "./package.json:/app/package.json"
- "./package-lock.json:/app/package-lock.json"
- "./postcss.config.js:/app/postcss.config.js"
- "./webpack.config.js:/app/webpack.config.js"
server:
# serves dist/
image: nginx:latest
ports:
- "8080:80"
volumes:
- "./dist:/usr/share/nginx/html:ro"
depends_on:
- builder