Update Dockerfile and readme
This commit is contained in:
parent
cfcd471ffc
commit
300d82a8ac
10
Dockerfile
10
Dockerfile
|
@ -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
|
||||||
|
|
10
README.md
10
README.md
|
@ -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:
|
||||||
|
|
Loading…
Reference in New Issue