fix json-server -H 0.0.0.0 (FIX #88, #91)

This commit is contained in:
kev 2019-03-17 13:11:04 +08:00
parent 17f8b8927a
commit 8277c9e8ba
4 changed files with 6 additions and 6 deletions

View File

@ -5,7 +5,7 @@
FROM alpine
MAINTAINER kev <noreply@easypi.pro>
WORKDIR /app
WORKDIR /data
RUN set -xe \
&& apk add --no-cache nodejs nodejs-npm \

View File

@ -10,15 +10,15 @@ Get a full fake REST API with zero coding in less than 30 seconds (seriously) wi
```yaml
json-server:
image: vimagick/json-server
command: -w db.json
command: -H 0.0.0.0 -p 3000 -w db.json
ports:
- "3000:3000"
volumes:
- ./db.json:/app/db.json
- ./data:/data
restart: always
```
## db.json
## data/db.json
```json
{

View File

@ -1,8 +1,8 @@
json-server:
image: vimagick/json-server
command: -w db.json
command: -H 0.0.0.0 -p 3000 -w db.json
ports:
- "3000:3000"
volumes:
- ./db.json:/app/db.json
- ./data:/data
restart: always