From 089cea004280b16dd5c77f70e598107bd5dee024 Mon Sep 17 00:00:00 2001 From: Zed Date: Fri, 18 Oct 2019 00:10:40 +0200 Subject: [PATCH] Add docker instructions to readme --- Dockerfile | 3 ++- README.md | 6 ++++++ tests/test_card.py | 12 ++++++------ 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 7629a5d..a613a11 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,7 +1,8 @@ FROM nimlang/nim:alpine as nim MAINTAINER setenforce@protonmail.com EXPOSE 8080 -ENV HOSTNAME nitter.net +ARG HOSTNAME +ENV HOSTNAME ${HOSTNAME:-nitter.net} COPY . /src/nitter WORKDIR /src/nitter diff --git a/README.md b/README.md index caba340..59885d5 100644 --- a/README.md +++ b/README.md @@ -71,6 +71,12 @@ Set your port and page title in `nitter.conf`, then run Nitter by executing `./n You should run Nitter behind a reverse proxy such as [Nginx](https://github.com/zedeus/nitter/wiki/Nginx) or Apache for better security. +To build and run Nitter in Docker: +```bash +docker build -t nitter:latest --build-arg HOSTNAME=nitter.net . +docker run -d -p 8080:8080 nitter:latest +``` + To run Nitter via systemd you can use this service file: ```bash diff --git a/tests/test_card.py b/tests/test_card.py index 3d694ac..93817a4 100644 --- a/tests/test_card.py +++ b/tests/test_card.py @@ -43,11 +43,6 @@ card = [ '', 'www.tesla.com', True], - ['mobile_test/status/490378953744318464', - 'Nantasket Beach', - 'Rocks on the beach.', - '500px.com', True], - ['voidtarget/status/1094632512926605312', 'Basic OBS Studio plugin, written in nim, supporting C++ (C fine too)', 'Basic OBS Studio plugin, written in nim, supporting C++ (C fine too) - obsplugin.nim', @@ -73,7 +68,12 @@ no_thumb = [ ['brent_p/status/1088857328680488961', 'Hts Nim Sugar', 'hts-nim is a library that allows one to use htslib via the nim programming language. Nim is a garbage-collected language that compiles to C and often has similar performance. I have become very...', - 'brentp.github.io'] + 'brentp.github.io'], + + ['mobile_test/status/490378953744318464', + 'Nantasket Beach', + 'Rocks on the beach.', + '500px.com'] ] playable = [