Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker-compose.yml on Synology #61

Open
Anas92230 opened this issue Jan 25, 2024 · 14 comments
Open

Docker-compose.yml on Synology #61

Anas92230 opened this issue Jan 25, 2024 · 14 comments

Comments

@Anas92230
Copy link

Hello,

I try to run docker-compose.yml on my synology. All it's ok on local.
With my domain name:
-App is ok
-Upload is ok
-Download is KO. Link is : https://storage:9000...
Someone can help me to solve this point :-)

Thank you

@espebra
Copy link
Owner

espebra commented Jan 26, 2024

The s3 endpoint storage:9000 is used in the docker compose file for the local development environment. For access to s3 for external hosts, you need to specify the external address to the Minio service as the s3 endpoint.

The s3 endpoint is set using the S3_ENDPOINT environment variable in docker-compose.yml or the --s3-endpoint command line parameter to the filebin application.

Can you try this?

@Anas92230
Copy link
Author

Anas92230 commented Jan 27, 2024

Hello @espebra,
like this:
S3_ENDPOINT=https://storage.domain.com:9000 ?
`
version: "3"
services:
s3:
image: "minio/minio"
hostname: "storage"
restart: "no"
environment:
- MINIO_ROOT_USER=admin
- MINIO_ROOT_PASSWORD=passwd
expose:
- "9000"
- "9001"
ports:
- "9000:9000"
- "9001:9001"
entrypoint: [ "minio", "server", "/data", "--console-address", ":9001" ]
networks:
- local

db:
...
app:
build: .
restart: "no"
environment:
- DATABASE_HOST=db
- DATABASE_PORT=5432
- DATABASE_NAME=db
- DATABASE_USERNAME=admin
- DATABASE_PASSWORD=passwd
- S3_ENDPOINT=https://storage.domain.com:9000
- S3_REGION=us-east-1
- S3_BUCKET=filebin
- S3_ACCESS_KEY=admin
- S3_SECRET_KEY=passwd
- ADMIN_USERNAME=admin
- ADMIN_PASSWORD=passwd
- METRICS_USERNAME=admin
- METRICS_PASSWORD=passwd
- METRICS_AUTH=basic
expose:
- "8080"
ports:
- "8080:8080"
volumes:
- .:/app:delegated
depends_on:
- db
- s3
networks:
- local
entrypoint: [ "./wait-for-s3.sh", "make", "run" ]
networks:
local: null
`

@espebra
Copy link
Owner

espebra commented Jan 27, 2024

That should be it, yes. In addition, that port (9000) needs to be exposed externally from the s3 container.

@Anas92230
Copy link
Author

thanks I try it but no result :-( I have this error for app:
-Unable to initialize S3 connection: Endpoint url cannot have fully qualified paths.
minio is accessible from local. If I want to share, here is the link : http://127.0.0.1:9000/filebin/blablabla

@Anas92230
Copy link
Author

other info:
if I change this url by https://storage.mydomain.com/blablabla I can download file.

@espebra
Copy link
Owner

espebra commented Jan 30, 2024

Yes, that makes sense. You need to specify the external endpoint to S3 when specifying the S3 endpoint in Filebin. Note that archive downloads should work independent from this, since archive downloads are proxied via the Filebin app.

I believe the issue is solved. Correct?

@Anas92230
Copy link
Author

No. this parameter S3_ENDPOINT don't work :-(
Do you ever try it for external use?

@espebra
Copy link
Owner

espebra commented Jan 30, 2024

I only use the docker compose file as it is in the repository, for local testing. In production I use the S3_ENDPOINT environment variable pointing to the external hostname of the S3 service (but without docker and docker compose).

@espebra
Copy link
Owner

espebra commented Jan 30, 2024

Can you please try to update the wait-for-s3.sh script so that it is using the external hostname for S3 as well?

@Anas92230
Copy link
Author

Hello,
ok I'm going to try it.
Thank you

@Anas92230
Copy link
Author

Hello,

I successed in installation with Minio only. All it's ok from external I can upload file and share it with someone and it's possible for him to download it.
here's my docker-compose :
`version: "3.8"

services:
minio:
image: quay.io/minio/minio
command: server /data --console-address ":9001"
volumes:
- minio_data:/volume1/docker/minio/data
ports:
- 9090:9000
- 9001:9001
environment:
MINIO_ROOT_USER: username
MINIO_ROOT_PASSWORD: password
MINIO_BROWSER_REDIRECT_URL: https://console.mydomain.com
MINIO_SERVER_URL: https://s3.mydomain.com

volumes:
minio_data:
external: true`
But no success with filebin2:
docker logs filebin2-app-1 :
S3 service is available.
go version
go version go1.20.5 linux/amd64
mkdir -p artifacts tests
GOOS=linux GOARCH=amd64 go build -mod=vendor -o artifacts/filebin2-linux-amd64 -trimpath -buildvcs=false
artifacts/filebin2-linux-amd64 --listen-host 0.0.0.0 --lurker-interval 10 --expiration 3600 --access-log=access.log --s3-secure=false --db-host=db --limit-storage 1G --admin-username admin --admin-password changeme --metrics
Unable to load geoip database: open : no such file or directory
TTL for presigned S3 URLs: 1m0s
Unable to initialize S3 connection: Endpoint url cannot have fully qualified paths.
make: *** [Makefile:18: run] Error 2

@espebra
Copy link
Owner

espebra commented Feb 8, 2024

The error message says that the (s3) endpoint URL can't be a fully qualified path. Can you try specifying s3.mydomain.com instead of https://s3.mydomain.com/? It will by default expect https:// and port 443.

@Anas92230
Copy link
Author

i change only in filebin service. I have an other issue:
docker logs filebin2-app-1
S3 service is available.
go version
go version go1.20.5 linux/amd64
mkdir -p artifacts tests
GOOS=linux GOARCH=amd64 go build -mod=vendor -o artifacts/filebin2-linux-amd64 -trimpath -buildvcs=false
artifacts/filebin2-linux-amd64 --listen-host 0.0.0.0 --lurker-interval 10 --expiration 3600 --access-log=access.log --s3-secure=false --db-host=db --limit-storage 1G --admin-username admin --admin-password changeme --metrics
Unable to load geoip database: open : no such file or directory
TTL for presigned S3 URLs: 1m0s
Established session to S3AO at s3.mydomain.com
Unable to check if S3AO bucket exists: Access Denied.
Unable to initialize S3 connection: Access Denied.

make: *** [Makefile:18: run] Error 2

@Anas92230
Copy link
Author

Anas92230 commented Feb 8, 2024

another info if I change value of S3_ENDPOINT with storage:9000 and add entry for Minio service hostname:storage, I have in log:
docker logs filebin2-app-1
S3 service is available.
go version
go version go1.20.5 linux/amd64
mkdir -p artifacts tests
GOOS=linux GOARCH=amd64 go build -mod=vendor -o artifacts/filebin2-linux-amd64 -trimpath -buildvcs=false
artifacts/filebin2-linux-amd64 --listen-host 0.0.0.0 --lurker-interval 10 --expiration 3600 --access-log=access.log --s3-secure=false --db-host=db --limit-storage 1G --admin-username admin --admin-password changeme --metrics
Unable to load geoip database: open : no such file or directory
TTL for presigned S3 URLs: 1m0s
Established session to S3AO at storage:9000
Unable to check if S3AO bucket exists: Get "http://storage:9000/filebin/?location=": dial tcp: lookup storage on 127.0.0.11:53: no such host
Unable to initialize S3 connection: Get "http://storage:9000/filebin/?location=": dial tcp: lookup storage on 127.0.0.11:53: no such host

make: *** [Makefile:18: run] Error 2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants