Update Dockerfile and readme
This commit is contained in:
parent
cfcd471ffc
commit
300d82a8ac
2 changed files with 13 additions and 7 deletions
10
Dockerfile
10
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
|
||||
|
|
10
README.md
10
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:
|
||||
|
|
Loading…
Reference in a new issue