Based on TrafeX/docker-php-nginx, this sample project shows how to build and start the Stripe Mirakl Connector application on PHP-FPM 7.3, Nginx 1.16 and PostgreSQL 11.5 using Docker.
Although not production-ready as-is, it shows the basic configuration required.
Some examples of tasks required to complete the configuration for production:
- Replace the certs content with valid certificates.
- Update nginx.conf and php.ini to fit your server configuration.
- Deny access to the OpenAPI specs.
- Rename .env.dist to
.env
and update the configuration, see the Configuration step in our docs. - From the examples/docker folder, run
make install
to start the application. - If you are starting the application for the first time, run
make db-install
to set up the database.
See also Versioning.
To upgrade:
- Delete the
var
folder to clean the cache. - From the root of your clone, run
git pull
to download changes. - From the examples/docker folder, run
docker-compose up -d --build app
to rebuild and deploy the new version. - Run
make db-install
to check and apply database updates.
To downgrade:
- Find the latest database migration for the targeted version in src/Migrations.
- Run the database migrations with that version, e.g.
docker-compose run --rm app bin/console doctrine:migration:migrate --no-interaction 20201016122853
- Delete the
var
folder to clean the cache. - From the root of your clone, run
git reset
to the desired commit or tag. - From the examples/docker folder, run
docker-compose up -d --build app
to rebuild and deploy the desired version.
- Find the command you wish to run manually in app/config/crontab.
- Run the command through docker, e.g.
docker-compose run --rm app php bin/console connector:dispatch:process-transfer
Logs are available under the app
service: docker-compose logs -tf app
.