Leantime / docker-leantime

Official Docker Image for Leantime https://leantime.io
GNU Affero General Public License v3.0
190 stars 86 forks source link

File uploads do not get sent to S3 #81

Open SoCuul opened 3 months ago

SoCuul commented 3 months ago

Hi! I have configured Leantime to use s3 as a storage provider, but no files are being uploaded to the bucket. Leantime says that it uploaded the file successfully, but after a refresh of the page it lists there being no files.

Here's my .env

LEAN_PORT = '80'                           
LEAN_APP_URL = 'https://**********.com'  
LEAN_APP_DIR = ''             

LEAN_DEBUG = 0                                    

# Database - MySQL container
MYSQL_ROOT_PASSWORD = '*****************' 
MYSQL_DATABASE = 'leantime'    
MYSQL_USER = 'lean'                    
MYSQL_PASSWORD = '************'  

# Database - leantime container
LEAN_DB_HOST = 'leantime-db'               
LEAN_DB_USER = 'lean'                              
LEAN_DB_PASSWORD = ''************''
LEAN_DB_DATABASE = 'leantime'                   
LEAN_DB_PORT = '3306'                        

LEAN_SITENAME = 'Leantime'                        
LEAN_LANGUAGE = 'en-US'                         
LEAN_DEFAULT_TIMEZONE = 'America/Los_Angeles'        
LEAN_ENABLE_MENU_TYPE = false                      
LEAN_SESSION_PASSWORD = '*******************'
LEAN_SESSION_EXPIRATION = 172800           
LEAN_LOG_PATH = null                              

LEAN_LOGO_PATH = '/images/logo.svg'    
LEAN_PRINT_LOGO_URL = '/images/logo.jpg'         
LEAN_DEFAULT_THEME = 'default'                    
LEAN_PRIMARY_COLOR = '#1b75bb'                   
LEAN_SECONDARY_COLOR = '#6f03fc'                 

## Fileuploads

# Local File Uploads
LEAN_USER_FILE_PATH = 'userfiles/'                 # Local relative path to store uploaded files (if not using S3)
LEAN_DB_BACKUP_PATH = 'backupdb/'                  # Local relative path to store backup files, need permission to write

# S3 File Uploads
LEAN_USE_S3 = true                            
LEAN_S3_KEY = 'censored-key'   
LEAN_S3_SECRET = 'censored-secret'
LEAN_S3_BUCKET = 'censored-bucket-name'        
LEAN_S3_USE_PATH_STYLE_ENDPOINT = true
LEAN_S3_REGION = 'us-east-005'                
LEAN_S3_FOLDER_NAME = ''                        
LEAN_S3_END_POINT = 'https://s3.us-east-005.backblazeb2.com'
phulstaert commented 1 month ago

Hi, I don't know if this still is an issue, but I have experimented with S3 myself a bit (self hosted using MinIO).

I at least can confirm S3 is working. I left the LEAN_S3_USE_PATH_STYLE_ENDPOINT commented out.

When looking at your end point, i see that you also have your region in there. I would try to comment out the LEAN_S3_REGION and the unused LEAN_S3_FOLDER_NAME. So it would look something like this:

LEAN_USE_S3 = true                            
LEAN_S3_KEY = 'censored-key'   
LEAN_S3_SECRET = 'censored-secret'
LEAN_S3_BUCKET = 'censored-bucket-name'
LEAN_S3_END_POINT = 'https://s3.us-east-005.backblazeb2.com'

Oh, and ensure you have write permissions :-)