Install
Requirements
You will need to have Docker on your machine.
Options 1: Run the ready Docker image
Pull the docker image
Start the container
To use custom parameters, make a copy of parameters.yml to your current directory. Update to suit your needs and run the command with volume parameter to replace the original parameters file.
docker run -itd -p 8080:80 -v $(pwd)/parameters.yml:/var/www/html/config/parameters.yml flyimg/flyimg
Options 2: Build from source
You can spin up your own working server in 10 minutes using the provision scripts for AWS Elastic Beanstalk or the DigitalOcean Ubuntu Droplets.
For other environments or if you want to tweak and play in your machine before rolling out, read along...
CD into the folder and to build the docker image by running:
This will download and build the main image, It will take a few minutes.
IMPORTANT! If you cloned the project, only for the first time, you need to run composer install
inside the container:
Again, it will take a few minutes to download the dependencies.
Then run the container:
For Fish shell users:
The above command will make the Dockerfile run s6-overlay command which launches 2 processes: nginx and php-fpm and starts listening on port 8080.
Testing Flyimg service
You can navigate to your machine's IP in port 8080 (ex: http://127.0.0.1:8080/ ) ; you should get the demo homepage of Flyimg already working. If you get any errors at this stage it's most likely that composer has not finished installing or skipped something.
You can test your image resizing service by navigating to: http://127.0.0.1:8080/upload/w_600,h_500,q_90/https://mudawn.com/assets/butterfly-3000.jpg
It's working!
This is fetching an image , resizing it, saving it and serving it.