Application does not use S3 storage defined through compose environment
stex opened this issue Β· comments
Hey π
I've set up monica with an external database server and an S3 bucket (hosted by wasabi) through the following compose file:
version: "3.7"
services:
app:
image: monica:3.7.0-apache
ports:
- "9876:80"
environment:
- APP_DEBUG=true
- APP_ENV=production
- APP_KEY=REDACTED
- APP_URL=REDACTED
- DB_HOST=REDACTED
- DB_USERNAME=REDACTED
- DB_PASSWORD=REDACTED
- MAIL_MAILER=smtp
- MAIL_HOST=REDACTED
- MAIL_PORT=REDACTED
- MAIL_USERNAME=REDACTED
- MAIL_PASSWORD=REDACTED
- MAIL_FROM_ADDRESS=REDACTED
- MAIL_FROM_NAME=Monica
- FILESYSTEM_DISK=s3
- AWS_KEY=REDACTED
- AWS_SECRET=REDACTED
- AWS_REGION=eu-central-2
- AWS_BUCKET=REDACTED
- AWS_SERVER=s3.eu-central-2.wasabisys.com
- S3_PATH_STYLE=true
- ENABLE_GEOLOCATION=true
- LOCATION_IQ_API_KEY=REDACTED
volumes:
- ./data:/var/www/html/storage
restart: unless-stopped
The database is picked up fine, but monica is still using the local storage. Neither the server nor the laravel log file contains any error messages.
I think I followed the documentation pretty closely, is there something I'm missing or is this an actual bug?
Thanks in advance!
You've set FILESYSTEM_DISK=s3
FILESYSTEM_DISK
is the name of the variable starting version 4.0.0. The previous variable name was DEFAULT_FILESYSTEM
. See monicahq/monica#6098
So if you use the new 4.0.0 version, it should work now - or you can rename your variable.