Giter Site home page Giter Site logo

ukitazume / docker-node-webserver Goto Github PK

View Code? Open in Web Editor NEW

This project forked from netresearch/docker-node-webserver

0.0 1.0 0.0 64 KB

Provides a server (via Express.js) to expose static files from the Docker host via HTTP

License: MIT License

JavaScript 65.48% Dockerfile 11.80% HTML 22.72%

docker-node-webserver's Introduction

node-webserver

https://img.shields.io/docker/automated/netresearch/node-webserver:alt:DockerAutomatedbuild

https://img.shields.io/docker/build/netresearch/node-webserver:alt:DockerBuildStatus

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

Usage

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

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

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

docker-compose example

version: '3.5'
services:
  app:
    image: netresearch/node-webserver
    environment:
    - VIRTUAL_HOST=my.example.com
    - VIRTUAL_NETWORK=webproxy
    - VIRTUAL_PORT=8080
    volumes:
    - ./app:/app/public:ro
    restart: always

networks:
  default:
    external:
      name: webproxy

Customization

You can override customize.js in order to customize the express application.

Logging

The Express.js app uses morgan to pipe the web logs to the STDOUT. This means that the logs are visible via docker logs node-web (if the container name is node-web).

docker-node-webserver's People

Contributors

cybottm avatar tobilg avatar ukitazume avatar vergissberlin avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.