mirror of
https://github.com/vimagick/dockerfiles.git
synced 2025-12-24 06:28:23 +01:00
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user