Skip to content

chhanz/fastapi-filestore

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

fastapi-filestore

This repository is FastAPI Filestore APP

Requirement for FastAPI

  • Python >= 3
  • FastAPI >= 0.70.0

Container Information

Tags

  • latest : This image is latest.

Default ID/PASSWD

ENV FILESTORE_ID="root" \
    FILESTORE_PASS="testtest"

if you want change id/passwd,

  • run docker/podman
    $ podman run -e FILESTORE_ID="changeid" -e FILESTORE_PASS="changeme" ....
    or
    $ docker run -e FILESTORE_ID="changeid" -e FILESTORE_PASS="changeme" ....

Run

$ podman run -d --name filestore quay.io/chhanz/fastapi-filestore
or
$ docker run -d --name filestore docker.io/han0495/fastapi-filestore

Mount Volume

if you want mount volume,

  • run docker/podman
    $ podman -v /root/upload:/usr/src/app/upload ....
    or
    $ docker -v /root/upload:/usr/src/app/upload ....

Expose Port

if you want expose port,

  • run docker/podman
    $ podman -p 30020:9090 ....
    or
    $ docker -p 30020:9090 ....

Dockerfile

FROM python:3.10.1-alpine3.15
MAINTAINER [email protected]

ENV FILESTORE_ID="root" \
    FILESTORE_PASS="testtest"

WORKDIR /usr/src/app

COPY . .
RUN mkdir /usr/src/app/upload \
    && pip install --no-cache-dir -r requirements.txt

CMD [ "uvicorn", "main:app", "--host", "0.0.0.0", "--port", "9090" ]

Build

$ git clone https://github.com/chhanz/fastapi-filestore.git
$ cd fastapi-filestore
$ docker build -t fastapi-filestore .

How to use 'filecmd'

Preview 'index'