Skip to content

Commit 603c15d

Browse files
authored
fix README
1 parent 294d335 commit 603c15d

File tree

1 file changed

+20
-29
lines changed

1 file changed

+20
-29
lines changed
Lines changed: 20 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,51 +1,42 @@
1-
**************
2-
node-webserver
3-
**************
1+
# node-webserver
42

53
Provides a minimal webserver (via Express.js) to expose static files from the Docker host via HTTP.
64
This image is build on Alpine Linux (base image `alpine:node`) and aims for a minimal size.
75

8-
Usage
9-
=====
6+
## Usage
107

118
You can expose a local directory which you want to have served via the `mini-webserver` by starting it with
129

1310
`docker run --name node-web -p 8080:8080 -v $PWD/test:/app/public:ro -d netresearch/node-webserver`
1411

1512
In this example, the port on the docker host where the `node-webserver` is reachable is `8080`.
1613

17-
----------------------
18-
docker-compose example
19-
----------------------
20-
21-
.. code:: yaml
22-
23-
version: '3.5'
24-
services:
25-
app:
26-
image: netresearch/node-webserver
27-
environment:
14+
### docker-compose.yml example
15+
16+
```yaml
17+
version: '3.5'
18+
services:
19+
app:
20+
image: netresearch/node-webserver
21+
environment:
2822
- VIRTUAL_HOST=my.example.com
2923
- VIRTUAL_NETWORK=webproxy
3024
- VIRTUAL_PORT=8080
31-
volumes:
25+
volumes:
3226
- ./app:/app/public:ro
33-
restart: always
27+
restart: always
3428

35-
networks:
36-
default:
37-
external:
38-
name: webproxy
29+
networks:
30+
default:
31+
external:
32+
name: webproxy
33+
```
3934
40-
-------------
41-
Customization
42-
-------------
35+
### Customization
4336
44-
You can override `customize.js <customize.js>`_ in order to customize the `express application <http://expressjs.com/en/4x/api.html#app>`_.
37+
You can override [customize.js](customize.js) in order to customize the [express application](http://expressjs.com/en/4x/api.html#app)
4538
46-
-------
47-
Logging
48-
-------
39+
### Logging
4940
5041
The Express.js app uses `morgan` to pipe the web logs to the `STDOUT`. This means that the logs are visible via
5142
`docker logs node-web` (if the container name is `node-web`).

0 commit comments

Comments
 (0)