Giter Site home page Giter Site logo

alt-s6-naviserver's Introduction

Table of Contents

About

This is NaviServer on ALT Linux base docker image (version sisyphus) using s6-overlay. To install the NaviServer I used code from Gustaf Neumann script install-ns.sh. The base image is oupfiz5/alt-s6-naviserver.

Naviserver-S6 is self-hosting at https://chiselapp.com/user/oupfiz5/repository/alt-s6-naviserver.

If you are reading this on GitHub, then you are looking at a Git mirror of the self-hosting Naviserver-S6 repository. The purpose of that mirror is to test and exercise Fossil's ability to export a Git mirror and using Github CI/CD (Github Actions). Nobody much uses the GitHub mirror, except to verify that the mirror logic works. If you want to know more about Naviserver-S6, visit the official self-hosting site linked above.

Prerequisite

Tools

  1. *nix operation system
  2. Install Docker
  3. Install git (optional)
  4. Install fossil (optional)

Third party tools

They are using for testing and scanning:

  1. Bats
  2. Shellcheck
  3. Hadolynt
  4. Dockle
  5. Snyk - not necessarily
  6. Trivy - not necessarily

Installation

Download from dockerhub

docker pull oupfiz5/alt-s6-naviserver:4.99.24

Build from chiselapp (fossil)

fossil clone https://chiselapp.com/user/oupfiz5/repository/alt-s6-naviserver alt-s6-naviserver.fossil
mkdir alt-s6-naviserver
cd alt-s6-naviserver
fossil open ../alt-s6-naviserver.fossil

Build image using multi steps (by means of docker from oupfiz5/tcl-build):

docker build -t oupfiz5/alt-s6-naviserver:4.99.24 -f ./Dockerfile .

Build from github

git clone https://github.com/oupfiz5/alt-s6-naviserver.git
cd alt-s6-naviserver
docker build -t oupfiz5/alt-s6-naviserver .

Build image using multi steps (by means of docker from oupfiz5/alt-s6-builder):

docker build -t oupfiz5/alt-s6-naviserver:4.99.24 -f ./Dockerfile .

Configuration

Build arguments

Arguments Default Description
BUILD_DATE none Set build date for label
NS_VERSION 4.99.24 Define version for Naviserver-S6
NS_MODULE_VERSION 4.99.24 Define version for Naviserver-S6 modules
TCL_VERSION 8.6.12 Define version for tcl
TCLLIB_VERSION 1.1.21 Define version for tcllib
TDOM_VERSION 0.9.1 Define version for tdom
RL_JSON_VERSION= 0.11.1 Define version for rl_json
XOTCL_VERSION 2.4.0 Define version for xotcl

Example of build

docker buildx build --no-cache \
        --build-arg BUILD_DATE=$(date -u +"%Y-%m-%dT%H:%M:%SZ") \
        --build-arg NS_VERSION='4.99.24' \
        --build-arg TCL_VERSION='8.6.12' \
        -t oupfiz5/alt-s6-naviserver:4.99.24 \
        -f ../Dockerfile \
         ../.

Configuration options

General options

Option Default Description
TZ UTC Set timezone, example Europe/Moscow
HTTP 8090 Set http listen port, example 18090
Configuration file nsd-config.tcl Configuration file for Naviserver

Timezone

Set the timezone for the container, defaults to UTC. To set the timezone set the desired timezone with the variable TZ.

docker run -itd \
       --restart always \
       --name=alt-s6-naviserver \
       --env 'TZ=Europe/Moscow' \
       -p 127.0.0.1:8090:8080 \
       oupfiz5/alt-s6-naviserver:4.99.24

HTTP listen port

Set the http listen port for the container -p 127.0.0.1:18090:8080. In this case the Naviserver-S6 is accessible by URL http://localhost:18090.

docker run -itd \
       --restart always \
       --name=alt-s6-naviserver \
       -p 127.0.0.1:18090:8080 \
       oupfiz5/alt-s6-naviserver:4.99.24

Configuration file

The default configuration file is rootfs/usr/local/ns/conf/nsd-config.tcl. For using own configuration file you can apply docker mount option:

  1. Create own configuration file with name nsd-config.tcl

  2. Put it to some directory (for example rootfs/usr/local/ns/conf/test)

  3. Mount the the directory from item 2 as /usr/local/ns/conf

    docker run -itd \
           --restart always \
           --name=alt-s6-naviserver  \
           -p 127.0.0.1:8090:8080 \
           --mount type=bind,src=$(pwd)/rootfs/usr/local/ns/conf/test,destination=/usr/local/ns/conf \
           oupfiz5/alt-s6-naviserver:4.99.24
    

Quickstart

Start Naviserver using CLI:

docker run -itd \
       --restart always \
       --name=alt-s6-naviserver \
       -p 127.0.0.1:8090:8080 \
       oupfiz5/alt-s6-naviserver:4.99.24

Start Naviserver using script start.sh:

./start.sh

After start open the naviserver will be accessible by url http://localhost:8090

Continues integration

For build and push docker images using Github Actions workflow. Flow process is GitHub flow.

Troubleshooting

Log output

For debugging and maintenance purposes you may want access the output log. If you are using Docker version 1.3.0 or higher you can access a running containers shell by starting bash using docker interactive:

docker run -it --rm \
       --name=naviserver-s6 \
       -p 127.0.0.1:8090:8080 \
       oupfiz5/alt-s6-naviserver:4.99.24

Shell access

For debugging and maintenance purposes you may want access the containers shell. If you are using Docker version 1.3.0 or higher you can access a running containers shell by starting bash using docker exec:

docker exec -it alt-s6-naviserver /bin/bash

alt-s6-naviserver's People

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.