diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..243281e --- /dev/null +++ b/Dockerfile @@ -0,0 +1,10 @@ +FROM ubuntu:20.04 +RUN apt-get update && \ + apt-get install -y \ + gcc \ + make \ + && rm -rf /var/lib/apt/lists/* +COPY . /app +RUN chmod +x /app/entrypoint.sh +RUN cd /app && make && make install +ENTRYPOINT [ "/app/entrypoint.sh"] \ No newline at end of file diff --git a/README.md b/README.md index e3922d5..a4fdc30 100644 --- a/README.md +++ b/README.md @@ -130,6 +130,23 @@ To use fiche you have to have netcat installed. You probably already have it - t ``` sudo make install ``` +## Docker + +### Running with Docker + +There is a Dockerfile and a docker-compose.yml in the repository. +You can run fiche with docker by cloning the repository with: +```bash +git clone https://github.com/solusipse/fiche +``` +Edit the docker-compose.yml to your needs (change the Domain, Port and Directory). +Finaly you can run fiche by typing +``` +docker-compose up -d +``` +in your terminal in the repositories folder. + +After that, fiche should be running at the specified port and you can use a webserver to serve your files from the folder you specified on the Dockerhost. ### Using Ports on FreeBSD diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..a5986aa --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,10 @@ +services: + fiche: + build: . + volumes: + - /mnt/hdd/docker/fiche/data:/home/data + ports: + - 9999:9999 + environment: + - DOMAIN=tbin.eu #change to your needs + restart: always diff --git a/entrypoint.sh b/entrypoint.sh new file mode 100644 index 0000000..5d4baf8 --- /dev/null +++ b/entrypoint.sh @@ -0,0 +1,2 @@ +#!/bin/bash +fiche -S -d $DOMAIN -o /home/data -l /home/data/log.txt