FTP Server that serve and store files on an S3 Bucket
2.7K
An ftp/sftp server using s3fs to mount an external s3 bucket as ftp/sftp storage.
Started from existing solution.
To run:
Copy docker-compose.example.yml to docker-compose.yml and replace the variables used with your values
USERS environment variable. These should be listed in the form username:hashedpassword, each separated by a space.openssl passwd -crypt {your_password}. Substitute {your_password} with the one you want to hash.echo $u | chpasswd -e => echo $u | chpasswd in the users.sh file (line #24).FTP_BUCKET) and configs (CONFIG_BUCKET) will be stored.IAM_ROLE environment variable.AWS_ACCESS_KEY_ID and the AWS_SECRET_KEY_ID keys.If you have changed other files aside the docker-compose.yml file, then you have to build the docker container using:
docker build --rm -t <docker/tag> path/to/dockerfile/folderThen after building the container (if necessary), run using:
docker-compose up -d
| Variable | Required | Default value | Content |
|---|---|---|---|
USERS | Yes | List of users to add to the ftp/sftp server. Listed in the form username:hashedpassword, each separated by a space. | |
FTP_BUCKET | Yes | S3 bucket where ftp/sftp users data will be stored. | |
CONFIG_BUCKET | Yes | S3 bucket where the config data (env.list file) will be stored. | |
IAM_ROLE | No | name of role account linked to EC2 instance the container is running in. | |
TRACE | No | 0 | 1 to enable verbose options in bash scripts |
MP_UMASK | No | 0022 | option in s3fs |
UMASK | No | 0002 | option in s3fs, default is rwxrwxr-x |
These two environment variables only need to be set if there is no linked IAM role to the EC2 instance.
AWS_ACCESS_KEY_ID = IAM user account access key.AWS_SECRET_ACCESS_KEY = IAM user account secret access key.AWS_DEFAULT_REGION = bucket regionTo use gitlab CI add the following variables to GitLab CI Configuration:
AWS_ACCESS_KEY_ID = IAM user account access key.AWS_SECRET_ACCESS_KEY = IAM user account secret access key.AWS_ECR_IMAGE = Image name in ECREnjoy!
Content type
Image
Digest
Size
255.2 MB
Last updated
almost 6 years ago
docker pull lorello/s3-backed-ftp