Fixing examples

- remove supervisord possibility due incompatibility with `tini`
- Fix example Dockerfiles
This commit is contained in:
Philipp Holzer 2021-03-27 23:44:50 +01:00
parent 7617279889
commit 83dafd7642
No known key found for this signature in database
GPG Key ID: 9A28B7D4FF5667BD
11 changed files with 10 additions and 92 deletions

View File

@ -1,22 +1,12 @@
# Examples section
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)
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.
## 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
In `docker-compose` additional services are bundled to create a complex Friendica installation.

View File

@ -1,4 +1,4 @@
FROM friendica/server:apache
FROM friendica:apache
RUN mkdir -p /usr/src/config
COPY addon.config.php /usr/src/config/

View File

@ -1,4 +1,4 @@
FROM friendica/server:fpm-alpine
FROM friendica:fpm-alpine
RUN mkdir -p /usr/src/config
COPY addon.config.php /usr/src/config/

View File

@ -1,4 +1,4 @@
FROM friendica/server:fpm
FROM friendica:fpm
RUN mkdir -p /usr/src/config
COPY addon.config.php /usr/src/config/

View File

@ -1,5 +1,5 @@
# Based on .exmples/dockerfiles/smtp/apache
FROM friendica/server:apache
FROM friendica:apache
# 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)
@ -9,4 +9,4 @@ ENV SMTP_HOST smtp.example.org
COPY *.sh /
RUN chmod +x /*.sh
RUN /smtp-config.sh
RUN /smtp-config.sh

View File

@ -1,5 +1,5 @@
# Based on .exmples/dockerfiles/smtp/fpm-alpine
FROM friendica/server:fpm-alpine
FROM friendica:fpm-alpine
ENV SMTP_HOST smtp.example.org
@ -15,4 +15,4 @@ RUN set -ex; \
# 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)
ENV SMTP_TYPE simple
ENV SMTP_TYPE simple

View File

@ -1,5 +1,5 @@
# Based on .exmples/dockerfiles/smtp/fpm
FROM friendica/server:fpm
FROM friendica:fpm
# 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)
@ -9,4 +9,4 @@ ENV SMTP_HOST smtp.example.org
COPY *.sh /
RUN chmod +x /*.sh
RUN /smtp-config.sh
RUN /smtp-config.sh

View File

@ -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"]

View File

@ -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

View File

@ -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"]

View File

@ -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