From 300d82a8acec56f8655fda00bd8ad3ee285f06ad Mon Sep 17 00:00:00 2001 From: Zed Date: Mon, 21 Oct 2019 06:17:08 +0200 Subject: [PATCH] Update Dockerfile and readme --- Dockerfile | 10 +++++----- README.md | 10 ++++++++-- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index a613a11..173007d 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,19 +1,19 @@ FROM nimlang/nim:alpine as nim MAINTAINER setenforce@protonmail.com EXPOSE 8080 -ARG HOSTNAME -ENV HOSTNAME ${HOSTNAME:-nitter.net} COPY . /src/nitter WORKDIR /src/nitter RUN apk update \ && apk add libsass-dev libffi-dev openssl-dev \ - && nimble build -y -d:release -d:hostname=${HOSTNAME} \ + && nimble build -y -d:release --passC:"-flto" --passL:"-flto" \ + && strip -s nitter \ && nimble scss FROM alpine WORKDIR /src/ -COPY --from=nim /src/nitter . -RUN apk add pcre-dev sqlite-dev +RUN apk --no-cache add pcre-dev sqlite-dev +COPY --from=nim /src/nitter/nitter /src/nitter/nitter.conf ./ +COPY --from=nim /src/nitter/public ./public CMD ./nitter diff --git a/README.md b/README.md index c4f7562..60b7ab5 100644 --- a/README.md +++ b/README.md @@ -11,6 +11,7 @@ Inspired by the [invidio.us](https://github.com/omarroth/invidious) project. - Dark theme - Lightweight (for [@nim_lang](https://twitter.com/nim_lang), 36KB vs 580KB from twitter.com) - Native RSS feeds +- Mobile support (responsive design) ## Todo (roughly in this order) @@ -76,8 +77,13 @@ 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 +docker build -t nitter:latest . +docker run -v $(pwd)/nitter.conf:/src/nitter.conf -d -p 8080:8080 nitter:latest +``` + +A prebuilt Docker image is provided as well: +```bash +docker run -v $(pwd)/nitter.conf:/src/nitter.conf -d -p 8080:8080 zedeus/nitter:latest ``` To run Nitter via systemd you can use this service file: