Working with Docker is pretty straight forward. The image available on Docker Hub contains the application code, any precompiled assets as well as PHP installed. This means you can use any web server you want, any cache driver you want and any database system you want.
To make things easier, we provide a Docker Compose file (docker-compose.production.yml) in the repository which contains all needed services, perfectly configured to just run the application right away.
All files you need are
nginx.conf. Copy both to the directory you
want to use for the application.
Now open the
.env.docker file and follow the instructions inside the file. All needed variables you have to configure
are marked accordingly.
This step is optional but may depend on your setup. You probably want to run the app standalon on a server. For this I
highly recommend providing SSL certificates (Let’s Encrypt) and change the
well as the
listen 0.0.0.0:8085 ssl;
nginx.conf: uncomment the lines beginning with
ssl_certificateand change the certificate file names
docker-compose.production.yml: uncommend the
/path/to/ssl/certificates:/bitnami/nginx/conf/bitnami/certsline and set the correct path to your certificates before the colon.
After you completed the above steps, run the following command to start up the container setup:
docker-compose up -d --build