Browse Source

Added docker support

master
Yiğit Çolakoğlu 5 years ago
parent
commit
f3cd22d8d4
2 changed files with 40 additions and 0 deletions
  1. +22
    -0
      Dockerfile
  2. +18
    -0
      docker-compose.yml

+ 22
- 0
Dockerfile View File

@ -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

+ 18
- 0
docker-compose.yml View File

@ -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

Loading…
Cancel
Save