diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..eb69b6b --- /dev/null +++ b/Dockerfile @@ -0,0 +1,22 @@ +FROM python:3 + +ENV PORT=8000 +ENV TITLE=femtoshare +ENV UID=1000 + +RUN mkdir -p /usr/src/femtoshare/ +RUN mkdir -p /usr/src/femtoshare/files +RUN useradd -u $UID femto + +COPY femtoshare.py /usr/src/femtoshare + +EXPOSE $PORT + + +RUN mkdir -p /files +RUN chown -R femto:femto /files +VOLUME /files +WORKDIR /usr/src/femtoshare +USER femto + +CMD python femtoshare.py --public --port $PORT --files-dir /files --title $TITLE \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..5cd41d2 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,18 @@ +version: '3.7' +services: + femtoshare: + build: + context: . + dockerfile: Dockerfile + ports: + - 8000:8000 + image: femtoshare:latest + restart: always + container_name: femtoshare + environment: + - PORT=8000 + - TITLE=femtoshare + - UID=1000 + user: "1000" + volumes: + - ./files:/files