mirror of
https://github.com/vimagick/dockerfiles
synced 2024-06-16 11:58:47 +00:00
parent
17f8b8927a
commit
8277c9e8ba
@ -5,7 +5,7 @@
|
|||||||
FROM alpine
|
FROM alpine
|
||||||
MAINTAINER kev <noreply@easypi.pro>
|
MAINTAINER kev <noreply@easypi.pro>
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /data
|
||||||
|
|
||||||
RUN set -xe \
|
RUN set -xe \
|
||||||
&& apk add --no-cache nodejs nodejs-npm \
|
&& apk add --no-cache nodejs nodejs-npm \
|
||||||
|
@ -10,15 +10,15 @@ Get a full fake REST API with zero coding in less than 30 seconds (seriously) wi
|
|||||||
```yaml
|
```yaml
|
||||||
json-server:
|
json-server:
|
||||||
image: vimagick/json-server
|
image: vimagick/json-server
|
||||||
command: -w db.json
|
command: -H 0.0.0.0 -p 3000 -w db.json
|
||||||
ports:
|
ports:
|
||||||
- "3000:3000"
|
- "3000:3000"
|
||||||
volumes:
|
volumes:
|
||||||
- ./db.json:/app/db.json
|
- ./data:/data
|
||||||
restart: always
|
restart: always
|
||||||
```
|
```
|
||||||
|
|
||||||
## db.json
|
## data/db.json
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
json-server:
|
json-server:
|
||||||
image: vimagick/json-server
|
image: vimagick/json-server
|
||||||
command: -w db.json
|
command: -H 0.0.0.0 -p 3000 -w db.json
|
||||||
ports:
|
ports:
|
||||||
- "3000:3000"
|
- "3000:3000"
|
||||||
volumes:
|
volumes:
|
||||||
- ./db.json:/app/db.json
|
- ./data:/data
|
||||||
restart: always
|
restart: always
|
||||||
|
Loading…
Reference in New Issue
Block a user