To use the fpm image you need an additional web server that can proxy http-request to the fpm-port of the container. For fpm connection this container exposes port 9000.
In most cases you might want use another container or your host as proxy.
If you use your host you can address your Friendica container directly on port 9000.
If you use another container, make sure that you add them to the same docker network (via `docker run --network <NAME> ...` or a `docker-compose` file).
As the fastCGI-Process is not capable of serving static files (style sheets, images, ...) the webserver needs access to these files.
This can be achieved with the `volumes-from` option.
You can find more information in the docker-compose section.
## Using the cron job
There are three options to enable the cron-job for Friendica:
- Using the default Image and activate the cron-job (see [Installation](https://friendi.ca/resources/installation/), sector `Activating scheduled tasks`)
- Using the default image (apache, fpm, fpm-alpine) and use **two** container (one for cron and one for the main app)
- Using one of the additional, prepared [`dockerfiles`](https://github.com/friendica/docker/tree/master/.examples/dockerfiles)
## Using sendmail for E-Mail support
You have to set the `--hostname/-h` parameter correctly to make the `mail()` command use the right domainname of it's e-mail.
Currently, the command `sendmail` will be used for the `mail()` support of Friendica.
Be aware that in production environment, you normally have an external MTA (or a SmartHost) for correctly signing and routing your e-mails.
See the Dockerfiles at [`smtp`](https://github.com/friendica/docker/tree/master/.examples/dockerfiles/smtp) for examples how to configure it.
### `apache` and `fpm` image
`sendmail` is used as a SMTP MTA for standalone usage and it works out-of-the-box.
### `fpm-alpine` image
For alpine, there is no "standalone" mail-service available.
By default the `latest` container uses a local MySQL-Database for data storage, but the Friendica setup wizard (appears on first run) allows connecting to an existing MySQL/MariaDB database.
You can also link a database container, e. g. `--link my-mysql:mysql`, and then use `mysql` as the database host on setup.
The Friendica installation and all data beyond what lives in the database (file uploads, etc) is stored in the [unnamed docker volume](https://docs.docker.com/engine/tutorials/dockervolumes/#adding-a-data-volume) volume `/var/www/html`.
The docker daemon will store that data within the docker directory `/var/lib/docker/volumes/...`.
That means your data is saved even if the container crashes, is stopped or deleted.
There are differences between the [stable](https://github.com/friendica/docker/tree/master/stable/) and the [develop](https://github.com/friendica/docker/tree/master/develop/) branches.
They have both in common that normally we do not automatically overwrite your working directory with the new version.
Instead you need to explicit run `friendica update` for the node for updating files&database.
## Updating stable
You have to pull the latest image from the hub (`docker pull friendica`).
## Updating develop
You don't need to pull the image for each commit in [friendica](https://github.com/friendica/friendica/).
Instead you can just update your node with `friendica update`.
It will clone the latest Friendica version and copy it to your working directory.
# The `friendica` CLI
To make the usage of the Dockerimages smooth, we created a little CLI.
It wraps the common commands for Friendica and adds new commands.