updating docker tools (#56)

updated the docker run command, changing the -d options to -v.
added a start.sh file and edited the Dockerfile.
This commit is contained in:
cpnfeeny 2021-04-15 17:31:33 +02:00 committed by GitHub
parent ac5b030ec2
commit 578f9ca276
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 4 deletions

View file

@ -1,5 +1,8 @@
FROM alpine:latest
RUN apk add cargo && wget https://github.com/mbrubeck/agate/archive/refs/tags/v3.0.2.tar.gz && tar xzf v3.0.2.tar.gz && mv /agate-3.0.2 /agate && cd agate && cargo build --release
CMD /agate --content /gmi/ \
--hostname $GEMINI_HOST \
--lang $GEMINI_LANG
RUN cp /agate/target/release/agate /usr/bin/agate
WORKDIR /app
COPY . /app
ADD . .
ENTRYPOINT ["/bin/sh", "start.sh"]

View file

@ -45,7 +45,7 @@ This process will take a few minutes because all the rust modules have to be com
## start the docker container
```
docker run -t -d --name agate -p 1965:1965 -d /var/www/gmi/:/gmi/ -d /var/www/gmi/.certificates/:/.certificates/ -e GEMINI_HOST=example.org -e GEMINI_LANG=en-US agate:latest
docker run -t -d -p 1965:1965 -v /var/www/gmi/:/gmi/ -v /var/www/gmi/.certificates/:/.certificates/ -e HOSTNAME=example.org -e LANG=en-US agate:latest
```
You have to replace `/var/www/gmi/` with the folder where you'd like to have gemtext files and `/var/www/gmi/.certificates/` with the folder where you'd like to have your certificates stored. You also have to have to replace `example.org` with your domain name and if plan to speak in a different language than english in your gemini space than you should replace `en-US` with your countries language code (for example de-DE or fr-CA).

6
tools/docker/start.sh Normal file
View file

@ -0,0 +1,6 @@
#!/bin/sh
exec agate --content /gmi/ \
--hostname ${HOSTNAME} \
--lang ${LANG}