GithubHelp home page GithubHelp logo

luvit-web-server's Introduction

Status: Pre-Alpha Initial development. Unstable.

jwrr/luvit-web-server/Dockerfile

This Dockerfile makes a web server using Lua and Luvit. Luvit provides asynchronous I/O for Lua, similar to Node.js.

Place your new content into the content folder.

Luvit Links

TLDR

build-server builds the docker container and start-server runs the container. use-server opens firefox to the server home page.

source scripts/server-aliases.sh
server-build
server-start
server-use
server-restart
server-status
server-stop

Build Docker Image

## Set path to Dockerfile.  Here are two examples. The first is from github,
## the second is current directory

## Build Docker Image
export DOCKER_IMAGE_TAG=jwrr/luvit-web-server
docker build -t $DOCKER_IMAGE_TAG .

## Verify image was built
docker images

Start and Run Docker Container
------------------------------

## Create and Start container from image
export DOCKER_CONTAINER_NAME=luvit1
export DOCKER_HOST_PORT=1337
export DOCKER_CONTAINER_PORT=1337
export DOCKER_CONTAINER_DIR=/var/www/html

docker run -d -p $DOCKER_HOST_PORT:$DOCKER_CONTAINER_PORT \
-v $PWD:$DOCKER_CONTAINER_DIR --name $DOCKER_CONTAINER_NAME $DOCKER_IMAGE_TAG

## Verify container is running
docker ps

Use Docker Container

Using firefox access the container on port 1337. You should see a web page with several image types and links.

firefox localhost:1337

Stop Docker Container

## Stop container
docker stop $DOCKER_CONTAINER_NAME

## Verify container is on longer active, but that it exists
docker ps
docker ps -a

Remove Docker Container and Image

## Remove Container
docker rm $DOCKER_CONTAINER_NAME

## Verify container has been removed
docker ps -a

## Remove Image
docker rmi $DOCKER_IMAGE_TAG

## Verify image has been removed
docker images

luvit-web-server's People

Contributors

jwrr 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.