mirror of
https://github.com/vimagick/dockerfiles.git
synced 2024-11-28 09:08:50 +02:00
add json-server
This commit is contained in:
parent
1b598ed8ec
commit
95b0cb5345
@ -58,6 +58,7 @@ A collection of delicious docker recipes.
|
||||
- [x] jamapi
|
||||
- [x] jenkins-arm :beetle:
|
||||
- [x] joomla
|
||||
- [x] json-server
|
||||
- [x] mantisbt
|
||||
- [x] mariadb
|
||||
- [x] minidlna
|
||||
|
18
json-server/Dockerfile
Normal file
18
json-server/Dockerfile
Normal file
@ -0,0 +1,18 @@
|
||||
#
|
||||
# Dockerfile for json-server
|
||||
#
|
||||
|
||||
FROM alpine
|
||||
MAINTAINER kev <noreply@easypi.info>
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
RUN set -xe \
|
||||
&& apk add -U nodejs \
|
||||
&& npm install -g json-server \
|
||||
&& rm -rf /tmp/npm* /var/cache/apk/*
|
||||
|
||||
EXPOSE 3000
|
||||
|
||||
ENTRYPOINT ["json-server"]
|
||||
CMD ["--help"]
|
8
json-server/README.md
Normal file
8
json-server/README.md
Normal file
@ -0,0 +1,8 @@
|
||||
json-server
|
||||
===========
|
||||
|
||||
![](https://badge.imagelayers.io/vimagick/json-server:latest.svg)
|
||||
|
||||
Get a full fake REST API with zero coding in less than 30 seconds (seriously) with [json-server][1].
|
||||
|
||||
[1]: https://github.com/typicode/json-server
|
9
json-server/db.json
Normal file
9
json-server/db.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"posts": [
|
||||
{ "id": 1, "title": "json-server", "author": "typicode" }
|
||||
],
|
||||
"comments": [
|
||||
{ "id": 1, "body": "some comment", "postId": 1 }
|
||||
],
|
||||
"profile": { "name": "typicode" }
|
||||
}
|
8
json-server/docker-compose.yml
Normal file
8
json-server/docker-compose.yml
Normal file
@ -0,0 +1,8 @@
|
||||
json-server:
|
||||
image: vimagick/json-server
|
||||
command: -w db.json
|
||||
ports:
|
||||
- "3000:3000"
|
||||
volumes:
|
||||
- ./db.json:/app/db.json
|
||||
restart: always
|
Loading…
Reference in New Issue
Block a user