Update Dockerfile and readme

This commit is contained in:
Zed 2019-10-21 06:17:08 +02:00
parent cfcd471ffc
commit 300d82a8ac
2 changed files with 13 additions and 7 deletions

View File

@ -1,19 +1,19 @@
FROM nimlang/nim:alpine as nim FROM nimlang/nim:alpine as nim
MAINTAINER setenforce@protonmail.com MAINTAINER setenforce@protonmail.com
EXPOSE 8080 EXPOSE 8080
ARG HOSTNAME
ENV HOSTNAME ${HOSTNAME:-nitter.net}
COPY . /src/nitter COPY . /src/nitter
WORKDIR /src/nitter WORKDIR /src/nitter
RUN apk update \ RUN apk update \
&& apk add libsass-dev libffi-dev openssl-dev \ && 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 && nimble scss
FROM alpine FROM alpine
WORKDIR /src/ WORKDIR /src/
COPY --from=nim /src/nitter . RUN apk --no-cache add pcre-dev sqlite-dev
RUN apk add pcre-dev sqlite-dev COPY --from=nim /src/nitter/nitter /src/nitter/nitter.conf ./
COPY --from=nim /src/nitter/public ./public
CMD ./nitter CMD ./nitter

View File

@ -11,6 +11,7 @@ Inspired by the [invidio.us](https://github.com/omarroth/invidious) project.
- Dark theme - Dark theme
- Lightweight (for [@nim_lang](https://twitter.com/nim_lang), 36KB vs 580KB from twitter.com) - Lightweight (for [@nim_lang](https://twitter.com/nim_lang), 36KB vs 580KB from twitter.com)
- Native RSS feeds - Native RSS feeds
- Mobile support (responsive design)
## Todo (roughly in this order) ## Todo (roughly in this order)
@ -76,8 +77,13 @@ security.
To build and run Nitter in Docker: To build and run Nitter in Docker:
```bash ```bash
docker build -t nitter:latest --build-arg HOSTNAME=nitter.net . docker build -t nitter:latest .
docker run -d -p 8080:8080 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: To run Nitter via systemd you can use this service file: