file upload server
  • Go 83.8%
  • Dockerfile 8.1%
  • HTML 8.1%
Find a file
cătălin 73ecac192e
Some checks reported errors
continuous-integration/drone/push Build is passing
continuous-integration/drone Build was killed
doc: clean readme typos
2022-06-28 16:26:53 +02:00
design feat: add /files/{file} GET and DELETE methods 2022-06-28 14:11:37 +02:00
.drone.yml ci: remove staticcheck install using go install in favor of alpine's 2022-06-28 15:27:16 +02:00
.gitignore feat: add /files/{file} GET and DELETE methods 2022-06-28 14:11:37 +02:00
Caddyfile feat: add openapi design doc 2022-06-28 10:12:35 +02:00
docker-compose.yml feat: add /files/{file} GET and DELETE methods 2022-06-28 14:11:37 +02:00
Dockerfile ci: fix staticcheck job by adding libc and gcc deps 2022-06-28 15:21:22 +02:00
go.mod feat: add openapi design doc 2022-06-28 10:11:35 +02:00
handlers.go ci: add staticcheck job 2022-06-28 15:09:00 +02:00
logger.go feat: add openapi design doc 2022-06-28 10:12:35 +02:00
main.go ci: add staticcheck job 2022-06-28 15:09:00 +02:00
README.md doc: clean readme typos 2022-06-28 16:26:53 +02:00

sfu

Build Status

simple requirementless, authenticationless file upload server

prod version

  • to expose a local folder called ./files:
docker run --name sfu -d \
  -v $(pwd)/files:/opt/sfu/files \
  -e SFU_FILES_DIR=/opt/sfu/files \
  -e SFU_PORT=80 \
  -p 8000:80 \
  185504a9/sfu

  • ... modify accordingly

dev version

docker

  1. take a look at docker-compose and modify the envvars accordingly. the default values should work as long as you're ok with a files/ folder being created and your user UID and GID are 1000. if for some reason you need other ids, please add them like this:
... 

app:
    build:
      context: .
      target: run_dev
    environment:
      - SFU_PORT=80
      - SFU_FILES_DIR=./files
      - gid=1234
      - uid=1234
...

dockerless

  1. sfu needs two envvars to be set
  • SFU_PORT: the port to listen on
  • SFU_FILES_DIR: the directory to store files in
  1. run the server
go build
SFU_PORT=80 SFU_FILES_DIR=./files ./main