mirror of
https://github.com/friendica/docker
synced 2025-05-06 03:00:14 +02:00
Merge pull request #148 from nupplaphil/enh/README
README & Example fixings
This commit is contained in:
commit
e1b356aea8
12 changed files with 18 additions and 98 deletions
|
@ -1,22 +1,12 @@
|
||||||
# Examples section
|
# Examples section
|
||||||
|
|
||||||
In this subfolder are some examples how to use the docker images.
|
In this subfolder are some examples how to use the docker images.
|
||||||
There are two section:
|
There is currently one section:
|
||||||
|
|
||||||
* [`dockerfiles`](https://github.com/friendica/docker/tree/stable/.examples/dockerfiles)
|
|
||||||
* [`docker-compose`](https://github.com/friendica/docker/tree/stable/.examples/docker-compose)
|
* [`docker-compose`](https://github.com/friendica/docker/tree/stable/.examples/docker-compose)
|
||||||
|
|
||||||
The `dockerfiles` are derived images that add or alter certain functionalities of the default docker images.
|
|
||||||
In the `docker-compose` subfolder are examples for deployment of the application.
|
In the `docker-compose` subfolder are examples for deployment of the application.
|
||||||
|
|
||||||
## Dockerfiles
|
|
||||||
|
|
||||||
The Dockerfiles use the default images as base image and build on top of it.
|
|
||||||
|
|
||||||
Examples | Descriptions
|
|
||||||
-------- | -------
|
|
||||||
[cron](https://github.com/friendica/docker/tree/stable/.examples/dockerfiles/cron) | uses supervisor to run the cron job inside the container (so no extra container is needed).
|
|
||||||
|
|
||||||
## docker-compose
|
## docker-compose
|
||||||
|
|
||||||
In `docker-compose` additional services are bundled to create a complex Friendica installation.
|
In `docker-compose` additional services are bundled to create a complex Friendica installation.
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
FROM friendica/server:apache
|
FROM friendica:apache
|
||||||
|
|
||||||
RUN mkdir -p /usr/src/config
|
RUN mkdir -p /usr/src/config
|
||||||
COPY addon.config.php /usr/src/config/
|
COPY addon.config.php /usr/src/config/
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
FROM friendica/server:fpm-alpine
|
FROM friendica:fpm-alpine
|
||||||
|
|
||||||
RUN mkdir -p /usr/src/config
|
RUN mkdir -p /usr/src/config
|
||||||
COPY addon.config.php /usr/src/config/
|
COPY addon.config.php /usr/src/config/
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
FROM friendica/server:fpm
|
FROM friendica:fpm
|
||||||
|
|
||||||
RUN mkdir -p /usr/src/config
|
RUN mkdir -p /usr/src/config
|
||||||
COPY addon.config.php /usr/src/config/
|
COPY addon.config.php /usr/src/config/
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Based on .exmples/dockerfiles/smtp/apache
|
# Based on .exmples/dockerfiles/smtp/apache
|
||||||
FROM friendica/server:apache
|
FROM friendica:apache
|
||||||
|
|
||||||
# simple = using an smtp without any credentials (mostly in local networks)
|
# simple = using an smtp without any credentials (mostly in local networks)
|
||||||
# custom = you need to set host, port, auth_options, authinfo (e.g. for GMX support)
|
# custom = you need to set host, port, auth_options, authinfo (e.g. for GMX support)
|
||||||
|
@ -9,4 +9,4 @@ ENV SMTP_HOST smtp.example.org
|
||||||
|
|
||||||
COPY *.sh /
|
COPY *.sh /
|
||||||
RUN chmod +x /*.sh
|
RUN chmod +x /*.sh
|
||||||
RUN /smtp-config.sh
|
RUN /smtp-config.sh
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Based on .exmples/dockerfiles/smtp/fpm-alpine
|
# Based on .exmples/dockerfiles/smtp/fpm-alpine
|
||||||
FROM friendica/server:fpm-alpine
|
FROM friendica:fpm-alpine
|
||||||
|
|
||||||
ENV SMTP_HOST smtp.example.org
|
ENV SMTP_HOST smtp.example.org
|
||||||
|
|
||||||
|
@ -15,4 +15,4 @@ RUN set -ex; \
|
||||||
|
|
||||||
# simple = using an smtp without any credentials (mostly in local networks)
|
# simple = using an smtp without any credentials (mostly in local networks)
|
||||||
# custom = you need to set host, port, auth_options, authinfo (e.g. for GMX support)
|
# custom = you need to set host, port, auth_options, authinfo (e.g. for GMX support)
|
||||||
ENV SMTP_TYPE simple
|
ENV SMTP_TYPE simple
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
# Based on .exmples/dockerfiles/smtp/fpm
|
# Based on .exmples/dockerfiles/smtp/fpm
|
||||||
FROM friendica/server:fpm
|
FROM friendica:fpm
|
||||||
|
|
||||||
# simple = using an smtp without any credentials (mostly in local networks)
|
# simple = using an smtp without any credentials (mostly in local networks)
|
||||||
# custom = you need to set host, port, auth_options, authinfo (e.g. for GMX support)
|
# custom = you need to set host, port, auth_options, authinfo (e.g. for GMX support)
|
||||||
|
@ -9,4 +9,4 @@ ENV SMTP_HOST smtp.example.org
|
||||||
|
|
||||||
COPY *.sh /
|
COPY *.sh /
|
||||||
RUN chmod +x /*.sh
|
RUN chmod +x /*.sh
|
||||||
RUN /smtp-config.sh
|
RUN /smtp-config.sh
|
||||||
|
|
|
@ -1,14 +0,0 @@
|
||||||
FROM friendica/server:apache
|
|
||||||
|
|
||||||
RUN set -ex; \
|
|
||||||
\
|
|
||||||
apt-get update; \
|
|
||||||
apt-get install -y --no-install-recommends \
|
|
||||||
supervisor \
|
|
||||||
; \
|
|
||||||
rm -rf /var/lib/apt/lists/*; \
|
|
||||||
mkdir /var/log/supervisord /var/run/supervisord
|
|
||||||
|
|
||||||
COPY supervisord.conf /etc/supervisor/supervisord.conf
|
|
||||||
|
|
||||||
CMD ["/usr/bin/supervisord"]
|
|
|
@ -1,22 +0,0 @@
|
||||||
[supervisord]
|
|
||||||
nodaemon=true
|
|
||||||
logfile=/var/log/supervisord/supervisord.log
|
|
||||||
pidfile=/var/run/supervisord/supervisord.pid
|
|
||||||
childlogdir=/var/log/supervisord/
|
|
||||||
logfile_maxbytes=50MB ; maximum size of logfile before rotation
|
|
||||||
logfile_backups=10 ; number of backed up logfiles
|
|
||||||
loglevel=error
|
|
||||||
|
|
||||||
[program:apache2]
|
|
||||||
stdout_logfile=/dev/stdout
|
|
||||||
stdout_logfile_maxbytes=0
|
|
||||||
stderr_logfile=/dev/stderr
|
|
||||||
stderr_logfile_maxbytes=0
|
|
||||||
command=apache2-foreground
|
|
||||||
|
|
||||||
[program:cron]
|
|
||||||
stdout_logfile=/dev/stdout
|
|
||||||
stdout_logfile_maxbytes=0
|
|
||||||
stderr_logfile=/dev/stderr
|
|
||||||
stderr_logfile_maxbytes=0
|
|
||||||
command=/cron.sh
|
|
|
@ -1,14 +0,0 @@
|
||||||
FROM friendica/server:fpm
|
|
||||||
|
|
||||||
RUN set -ex; \
|
|
||||||
\
|
|
||||||
apt-get update; \
|
|
||||||
apt-get install -y --no-install-recommends \
|
|
||||||
supervisor \
|
|
||||||
; \
|
|
||||||
rm -rf /var/lib/apt/lists/*; \
|
|
||||||
mkdir /var/log/supervisord /var/run/supervisord
|
|
||||||
|
|
||||||
COPY supervisord.conf /etc/supervisor/supervisord.conf
|
|
||||||
|
|
||||||
CMD ["/usr/bin/supervisord"]
|
|
|
@ -1,22 +0,0 @@
|
||||||
[supervisord]
|
|
||||||
nodaemon=true
|
|
||||||
logfile=/var/log/supervisord/supervisord.log
|
|
||||||
pidfile=/var/run/supervisord/supervisord.pid
|
|
||||||
childlogdir=/var/log/supervisord/
|
|
||||||
logfile_maxbytes=50MB ; maximum size of logfile before rotation
|
|
||||||
logfile_backups=10 ; number of backed up logfiles
|
|
||||||
loglevel=error
|
|
||||||
|
|
||||||
[program:apache2]
|
|
||||||
stdout_logfile=/dev/stdout
|
|
||||||
stdout_logfile_maxbytes=0
|
|
||||||
stderr_logfile=/dev/stderr
|
|
||||||
stderr_logfile_maxbytes=0
|
|
||||||
command=apache2-foreground
|
|
||||||
|
|
||||||
[program:cron]
|
|
||||||
stdout_logfile=/dev/stdout
|
|
||||||
stdout_logfile_maxbytes=0
|
|
||||||
stderr_logfile=/dev/stderr
|
|
||||||
stderr_logfile_maxbytes=0
|
|
||||||
command=/cron.sh
|
|
14
README.md
14
README.md
|
@ -50,19 +50,20 @@ As the fastCGI-Process is not capable of serving static files (style sheets, ima
|
||||||
This can be achieved with the `volumes-from` option.
|
This can be achieved with the `volumes-from` option.
|
||||||
You can find more information in the docker-compose section.
|
You can find more information in the docker-compose section.
|
||||||
|
|
||||||
## Using the cron job
|
## Background tasks
|
||||||
|
|
||||||
There are three options to enable the cron-job for Friendica:
|
Friendica requires background tasks to fetch and send all kind of messages and maintain the complete instance.
|
||||||
|
This setup is crucial for the Friendica node.
|
||||||
|
There are two options to enable background tasks 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 and manually setup background tasks (see Friendica [Install](https://github.com/friendica/friendica/blob/2021.03-rc/doc/Install.md#required-background-tasks))
|
||||||
- Using the default image (apache, fpm, fpm-alpine) and creating **two** container (one for cron and one for the main app)
|
- Using the default image (apache, fpm, fpm-alpine) and starting a dedicated `cron` instance and use `cron.sh` as startup command (like this [Example](https://github.com/friendica/docker/blob/stable/.examples/docker-compose/insecure/mariadb-cron-redis/apache/docker-compose.yml))
|
||||||
- Using one of the additional, prepared [`cron dockerfiles`](https://github.com/friendica/docker/tree/stable/.examples/dockerfiles/cron)
|
|
||||||
|
|
||||||
## Possible Environment Variables
|
## Possible Environment Variables
|
||||||
|
|
||||||
**Friendica Settings**
|
**Friendica Settings**
|
||||||
|
|
||||||
- `FRIENDICA_URL` The Friendica URL.
|
- `FRIENDICA_URL` The Friendica complete URL including protocol, domain and subpath (example: https://friendica.local/sub/ ).
|
||||||
- `FRIENDICA_TZ` The default localization of the Friendica server.
|
- `FRIENDICA_TZ` The default localization of the Friendica server.
|
||||||
- `FRIENDICA_LANG` The default language of the Friendica server.
|
- `FRIENDICA_LANG` The default language of the Friendica server.
|
||||||
- `FRIENDICA_SITENAME` The Sitename of the Friendica server.
|
- `FRIENDICA_SITENAME` The Sitename of the Friendica server.
|
||||||
|
@ -155,6 +156,7 @@ The Friendica image supports auto configuration via environment variables.
|
||||||
You can preconfigure everything that is asked on the install page on first run.
|
You can preconfigure everything that is asked on the install page on first run.
|
||||||
To enable the automatic installation, you have to the following environment variables:
|
To enable the automatic installation, you have to the following environment variables:
|
||||||
|
|
||||||
|
- `FRIENDICA_URL` The Friendica complete URL including protocol, domain and subpath (example: https://friendica.local/sub/ ).
|
||||||
- `FRIENDICA_ADMIN_MAIL` E-Mail address of the administrator.
|
- `FRIENDICA_ADMIN_MAIL` E-Mail address of the administrator.
|
||||||
- `MYSQL_USER` Username for the database user using mysql / mariadb.
|
- `MYSQL_USER` Username for the database user using mysql / mariadb.
|
||||||
- `MYSQL_PASSWORD` Password for the database user using mysql / mariadb.
|
- `MYSQL_PASSWORD` Password for the database user using mysql / mariadb.
|
||||||
|
|
Loading…
Add table
Reference in a new issue