Giter Site home page Giter Site logo

sctskw / docker-hn Goto Github PK

View Code? Open in Web Editor NEW

This project forked from fauria/docker-hn

0.0 2.0 0.0 32 KB

๐Ÿณ Docker image to deploy Hacker News like sites (news.arc). Supports Google Analytics and many customizations.

Home Page: https://hub.docker.com/r/fauria/hn/

Arc 24.01% Shell 75.99%

docker-hn's Introduction

fauria/hn

docker_logodocker_fauria_logo

Roll your own Hacker News clone with this Docker image.

It is based on Anarki, a publicly modifiable 'wiki-like' fork of Arc Lisp.

It allows the customization of the following features:

  • Site and parent site URLs
  • Site name and description
  • Color
  • Favicon
  • Admin user
  • Google Analytics code

Installation from Docker registry hub.

You can download the image using the following command:

docker pull fauria/hn

Environment variables

The customization of the HN clone is done through the following environment variables:

  • Variable name: SITE_NAME
  • Default value: "My Forum"
  • Accepted values: Any string.
  • Description: Sets the site name, displayed in the top bar and used as the page title.

  • Variable name: SITE_DESCRIPTION
  • Default value: "What this site is about."
  • Accepted values: Any string.
  • Description: Sets the description of the site.

  • Variable name: SITE_URL
  • Default value: "http://news.example.com"
  • Accepted values: Public URL of the site.
  • Description: Sets is the main URL of the site.

  • Variable name: PARENT_URL
  • Default value: "http://www.example.com"
  • Accepted values: Any URL.
  • Description: Sets is the URL of the parent site, linked through the logo on the top bar. If there is no parent site, use the same value as in SITE_URL.

  • Variable name: ADMIN_USER
  • Default value: "admin"
  • Accepted values: Any valid username.
  • Description: Username of the admin user. After launching your site, register an account with that username to get admin privileges.

  • Variable name: RGB_COLOR
  • Default value: "B4B4B4"
  • Accepted values: Any RGB color expressed in hexadecimal, without hash.
  • Description: Sets the color for the top bar. Grey by default.

  • Variable name: FAVICON_URL
  • Default value: "/arc.png"
  • Accepted values: Any path or URL.
  • Description: Location of the favicon. By default, it uses the same file as the logo.

  • Variable name: GA_CODE
  • Default value: "disabled"
  • Accepted values: A Google Analytics tracking code, such as UA-12345678-9
  • Description: If specified, adds a Google Analytics tracking code to the site.

Exposed port and volumes

The image exposes port 8080 and exports two volumes:

  • /anarki/static: Static files such as images. UID: 0, GID: 2.
  • /anarki/www: User generated content and logs. UID: 0, GID: 2.

Use cases

Create a temporary container for testing purposes:

docker run -i -t --rm -e SITE_URL="http://127.0.0.1/" -e PARENT_URL="http://127.0.0.1/" -p 80:8080 fauria/hn

Create a production container, such as KeyDao:

docker run -e RGB_COLOR="649afa" -e ADMIN_USER=fauria -e SITE_NAME="KeyDao" -e SITE_DESCRIPTION="BlockChain news aggregator" -e SITE_URL="https://keydao.com/" -e PARENT_URL="https://keydao.com/" -e GA_CODE="UA-87936404-1" -p $COREOS_PRIVATE_IPV4:8080 -v /srv/keydao/www:/anarki/www -v /srv/keydao/static:/anarki/static -d --restart=always --name keydao fauria/hn

Note: This container is intended to be used behind a proxy such as Nginx.

docker-hn's People

Contributors

fauria avatar

Watchers

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