SimpleFileStorage is a lightweight file storage service built with .NET. This README provides instructions for using the Docker image with docker-compose.
To run the SimpleFileStorage service with Docker Compose, create a docker-compose.yml file with the following content:
services:
simplestorage:
image: ghcr.io/phaired/simplefilestorage:latest
container_name: simplestorage
ports:
- "5000:5000"
volumes:
- ./uploads:/app/uploads
- ./data:/app/data/
environment:
- ASPNETCORE_ENVIRONMENT=Production
- DownloadToken=sample
- UploadToken=sample
# Uncomment the next line to use PostgreSQL instead of SQLite
# - POSTGRES_CONNECTION_STRING=Host=postgres;Port=5432;Database=storage;Username=user;Password=passYou can provide some token if you want to add auth for upload/download file.
By default the service uses a local SQLite database stored in the mounted data directory. To use PostgreSQL instead, provide a connection string via the POSTGRES_CONNECTION_STRING environment variable as shown in the compose snippet above.
To start the SimpleFileStorage service, run the following command:
docker-compose up -dThis command will start the service in detached mode. You can access the service at http://localhost:5000.
To stop the SimpleFileStorage service, run:
docker-compose downFeel free to submit issues or pull requests.
This project is licensed under the MIT License.