2
0
Fork 0
mirror of https://github.com/friendica/docker synced 2026-01-07 01:28:05 +01:00

Bugfixing & Upgrading

- upgrade version
- fixing alpine Dockerfile (openssl to libressl)
- adding examples for SSMTP
- README updates & bugfixing
- Removed shell-script "friendica"
- Removed old .htconfig
- Adding SMTP example
- Upgrading docker-compose files
- Added upgrade.exclude list
This commit is contained in:
Philipp Holzer 2018-09-09 22:22:24 +02:00
commit 8493e35da4
No known key found for this signature in database
GPG key ID: 517BE60E2CE5C8A5
77 changed files with 2419 additions and 3988 deletions

View file

@ -0,0 +1,41 @@
FROM friendica/server:apache
# entrypoint.sh and cron.sh dependencies
RUN set -ex; \
\
apt-get update; \
apt-get install -y --no-install-recommends \
# For mail() support
ssmtp \
; \
rm -rf /var/lib/apt/lists/*;
ENV SMTP localhost
ENV SMTP_FROM no-reply
ENV SITENAME "Testsite"
# Setup SSMTP
RUN set -ex; \
sed -i "s/:root:/:${SITENAME}:/g" /etc/passwd ;\
sed -i "s/:Linux\ User:/:${SITENAME}:/g" /etc/passwd ;\
# add possible mail-senders
{\
echo "www-data:$SMTP_FROM@$HOSTNAME:$SMTP" ;\
echo "root:$SMTP_FROM@$HOSTNAME:$SMTP" ;\
} > /etc/ssmtp/revaliases;\
# replace ssmtp.conf settings
{\
echo "root=$SMTP_FROM@$HOSTNAME" ;\
echo "hostname=$HOSTNAME" ;\
echo "mailhub=$SMTP" ;\
echo "FromLineOverride=YES" ;\
[ -z "$SMTP_TLS" ] || echo "UseTLS=$SMTP_TLS" ;\
[ -z "$SMTP_STARTTLS" ] || echo "UseSTARTTLS=$SMTP_STARTTLS" ;\
[ -z "$SMTP_AUTH_USER" ] || echo "AuthUser=$SMTP_AUTH_USER" ;\
[ -z "$SMTP_AUTH_PASS" ] || echo "AuthPass=$SMTP_AUTH_PASS" ;\
[ -z "$SMTP_AUTH_METHOD" ] || echo "AuthMethod=$SMTP_AUTH_METHOD" ;\
} > /etc/ssmtp/ssmtp.conf;
RUN mkdir -p /usr/src/config
COPY addon.ini.php /usr/src/config/

View file

@ -0,0 +1,12 @@
<?php return <<<INI
[system]
cache_driver=redis
lock_driver=redis
redis_host=redis
pidfile = /var/run/friendica.pid
INI;
// Keep this line

View file

@ -1,5 +1,5 @@
MYSQL_PASSWORD=
MYSQL_DATABASE=friendica
MYSQL_USER=friendica
MYSQL_HOST=db
MYSQL_PASSWORD=
MYSQL_DATABASE=friendica
MYSQL_USER=friendica
MYSQL_HOST=db
MYSQL_PORT=3306

View file

@ -1,60 +1,52 @@
version: '2.1'
services:
db:
image: mariadb
restart: always
volumes:
- db:/var/lib/mysql/
environment:
- MYSQL_RANDOM_ROOT_PASSWORD=yes
env_file:
- db.env
redis:
image: redis
restart: always
app:
image: friendica/server:apache
restart: always
volumes:
- friendica:/var/www/html
environment:
- AUTOINSTALL=true
- CACHE_DRIVER=redis
- REDIS_HOST=redis
- MAILNAME=
- TZ=
- LANGUAGE=
- SMTP=
env_file:
- db.env
depends_on:
- db
hostname: friendica.local
ports:
- "80:80"
cron:
image: friendica/server:apache
restart: always
volumes:
- friendica:/var/www/html
entrypoint: /cron.sh
environment:
- CACHE_DRIVER=redis
- REDIS_HOST=redis
- MAILNAME=
- TZ=
- LANGUAGE=
- SMTP=
env_file:
- db.env
depends_on:
- db
hostname: friendica.local
volumes:
db:
version: '2.1'
services:
db:
image: mariadb
restart: always
volumes:
- db:/var/lib/mysql/
environment:
- MYSQL_RANDOM_ROOT_PASSWORD=yes
env_file:
- db.env
redis:
image: redis
restart: always
app:
build: ./app
restart: always
volumes:
- friendica:/var/www/html
environment:
- FRIENDICA_ADMIN_MAIL=
- FRIENDICA_TZ=
- FRIENDICA_LANG=
- SITENAME=
- SMTP=
env_file:
- db.env
depends_on:
- db
hostname: friendica.local
ports:
- "80:80"
cron:
build: ./app
restart: always
volumes:
- friendica:/var/www/html
entrypoint: /cron.sh
environment:
- SITENAME=
- SMTP=
depends_on:
- db
hostname: friendica.local
volumes:
db:
friendica:

View file

@ -0,0 +1,36 @@
FROM friendica/server:fpm-alpine
RUN set -ex; \
apk add --no-cache \
# For mail() support
ssmtp;
ENV SMTP localhost
ENV SMTP_FROM no-reply
ENV SITENAME "Testsite"
# Setup SSMTP
RUN set -ex; \
sed -i "s/:root:/:${SITENAME}:/g" /etc/passwd ;\
sed -i "s/:Linux\ User:/:${SITENAME}:/g" /etc/passwd ;\
# add possible mail-senders
{\
echo "www-data:$SMTP_FROM@$HOSTNAME:$SMTP" ;\
echo "root:$SMTP_FROM@$HOSTNAME:$SMTP" ;\
} > /etc/ssmtp/revaliases;\
# replace ssmtp.conf settings
{\
echo "root=$SMTP_FROM@$HOSTNAME" ;\
echo "hostname=$HOSTNAME" ;\
echo "mailhub=$SMTP" ;\
echo "FromLineOverride=YES" ;\
[ -z "$SMTP_TLS" ] || echo "UseTLS=$SMTP_TLS" ;\
[ -z "$SMTP_STARTTLS" ] || echo "UseSTARTTLS=$SMTP_STARTTLS" ;\
[ -z "$SMTP_AUTH_USER" ] || echo "AuthUser=$SMTP_AUTH_USER" ;\
[ -z "$SMTP_AUTH_PASS" ] || echo "AuthPass=$SMTP_AUTH_PASS" ;\
[ -z "$SMTP_AUTH_METHOD" ] || echo "AuthMethod=$SMTP_AUTH_METHOD" ;\
} > /etc/ssmtp/ssmtp.conf;
RUN mkdir -p /usr/src/config
COPY addon.ini.php /usr/src/config/

View file

@ -0,0 +1,12 @@
<?php return <<<INI
[system]
cache_driver=redis
lock_driver=redis
redis_host=redis
pidfile = /var/run/friendica.pid
INI;
// Keep this line

View file

@ -1,70 +1,65 @@
version: '2.1'
services:
db:
image: mariadb
restart: always
volumes:
- db:/var/lib/mysql/
environment:
- MYSQL_RANDOM_ROOT_PASSWORD=yes
env_file:
- db.env
redis:
image: redis
restart: always
app:
image: friendica/server:fpm-alpine
restart: always
volumes:
- friendica:/var/www/html
environment:
- AUTOINSTALL=true
- CACHE_DRIVER=redis
- REDIS_HOST=redis
- MAILNAME=
- TZ=
- LANGUAGE=
- SMTP=
env_file:
- db.env
depends_on:
- db
hostname: friendica.local
cron:
image: friendica/server:fpm-alpine
restart: always
volumes:
- friendica:/var/www/html
entrypoint: /cron.sh
environment:
- CACHE_DRIVER=redis
- REDIS_HOST=redis
- MAILNAME=
- TZ=
- LANGUAGE=
- SMTP=
env_file:
- db.env
depends_on:
- db
- app
hostname: friendica.local
web:
image: nginx
restart: always
volumes:
- friendica:/var/www/html:ro
- ./web/nginx.conf:/etc/nginx/nginx.conf:ro
depends_on:
- app
ports:
- "80:80"
volumes:
db:
version: '2.1'
services:
db:
image: mariadb
restart: always
volumes:
- db:/var/lib/mysql/
environment:
- MYSQL_RANDOM_ROOT_PASSWORD=yes
env_file:
- db.env
redis:
image: redis
restart: always
app:
build: ./app
restart: always
volumes:
- friendica:/var/www/html
environment:
- FRIENDICA_ADMIN_MAIL=
- FRIENDICA_TZ=
- FRIENDICA_LANG=
- SITENAME=
- SMTP=
env_file:
- db.env
depends_on:
- db
hostname: friendica.local
cron:
build: ./app
restart: always
volumes:
- friendica:/var/www/html
entrypoint: /cron.sh
environment:
- FRIENDICA_ADMIN_MAIL=
- FRIENDICA_TZ=
- FRIENDICA_LANG=
- SITENAME=
- SMTP=
depends_on:
- db
- app
hostname: friendica.local
web:
image: nginx
restart: always
volumes:
- friendica:/var/www/html:ro
- ./web/nginx.conf:/etc/nginx/nginx.conf:ro
depends_on:
- app
ports:
- "80:80"
volumes:
db:
friendica:

View file

@ -0,0 +1,41 @@
FROM friendica/server:fpm
# entrypoint.sh and cron.sh dependencies
RUN set -ex; \
\
apt-get update; \
apt-get install -y --no-install-recommends \
# For mail() support
ssmtp \
; \
rm -rf /var/lib/apt/lists/*;
ENV SMTP localhost
ENV SMTP_FROM no-reply
ENV SITENAME "Testsite"
# Setup SSMTP
RUN set -ex; \
sed -i "s/:root:/:${SITENAME}:/g" /etc/passwd ;\
sed -i "s/:Linux\ User:/:${SITENAME}:/g" /etc/passwd ;\
# add possible mail-senders
{\
echo "www-data:$SMTP_FROM@$HOSTNAME:$SMTP" ;\
echo "root:$SMTP_FROM@$HOSTNAME:$SMTP" ;\
} > /etc/ssmtp/revaliases;\
# replace ssmtp.conf settings
{\
echo "root=$SMTP_FROM@$HOSTNAME" ;\
echo "hostname=$HOSTNAME" ;\
echo "mailhub=$SMTP" ;\
echo "FromLineOverride=YES" ;\
[ -z "$SMTP_TLS" ] || echo "UseTLS=$SMTP_TLS" ;\
[ -z "$SMTP_STARTTLS" ] || echo "UseSTARTTLS=$SMTP_STARTTLS" ;\
[ -z "$SMTP_AUTH_USER" ] || echo "AuthUser=$SMTP_AUTH_USER" ;\
[ -z "$SMTP_AUTH_PASS" ] || echo "AuthPass=$SMTP_AUTH_PASS" ;\
[ -z "$SMTP_AUTH_METHOD" ] || echo "AuthMethod=$SMTP_AUTH_METHOD" ;\
} > /etc/ssmtp/ssmtp.conf;
RUN mkdir -p /usr/src/config
COPY addon.ini.php /usr/src/config/

View file

@ -0,0 +1,12 @@
<?php return <<<INI
[system]
cache_driver=redis
lock_driver=redis
redis_host=redis
pidfile = /var/run/friendica.pid
INI;
// Keep this line

View file

@ -1,68 +1,65 @@
version: '2.1'
services:
db:
image: mariadb
restart: always
volumes:
- db:/var/lib/mysql/
environment:
- MYSQL_RANDOM_ROOT_PASSWORD=yes
env_file:
- db.env
redis:
image: redis
restart: always
app:
image: friendica/server:fpm
restart: always
volumes:
- friendica:/var/www/html
environment:
- AUTOINSTALL=true
- CACHE_DRIVER=redis
- REDIS_HOST=redis
- MAILNAME=
- TZ=
- LANGUAGE=
env_file:
- db.env
depends_on:
- db
hostname: friendica.local
cron:
image: friendica/server:fpm
restart: always
volumes:
- friendica:/var/www/html
entrypoint: /cron.sh
environment:
- CACHE_DRIVER=redis
- REDIS_HOST=redis
- MAILNAME=
- TZ=
- LANGUAGE=
env_file:
- db.env
depends_on:
- db
- app
hostname: friendica.local
web:
image: nginx
restart: always
volumes:
- friendica:/var/www/html:ro
- ./web/nginx.conf:/etc/nginx/nginx.conf:ro
depends_on:
- app
ports:
- "80:80"
volumes:
db:
version: '2.1'
services:
db:
image: mariadb
restart: always
volumes:
- db:/var/lib/mysql/
environment:
- MYSQL_RANDOM_ROOT_PASSWORD=yes
env_file:
- db.env
redis:
image: redis
restart: always
app:
build: ./app
restart: always
volumes:
- friendica:/var/www/html
environment:
- FRIENDICA_ADMIN_MAIL=
- FRIENDICA_TZ=
- FRIENDICA_LANG=
- SITENAME=
- SMTP=
env_file:
- db.env
depends_on:
- db
hostname: friendica.local
cron:
build: ./app
restart: always
volumes:
- friendica:/var/www/html
entrypoint: /cron.sh
environment:
- FRIENDICA_ADMIN_MAIL=
- FRIENDICA_TZ=
- FRIENDICA_LANG=
- SITENAME=
- SMTP=
depends_on:
- db
- app
hostname: friendica.local
web:
image: nginx
restart: always
volumes:
- friendica:/var/www/html:ro
- ./web/nginx.conf:/etc/nginx/nginx.conf:ro
depends_on:
- app
ports:
- "80:80"
volumes:
db:
friendica:

View file

@ -1,87 +1,86 @@
version: '2.1'
services:
db:
image: mariadb
restart: always
volumes:
- db:/var/lib/mysql/
environment:
- MYSQL_RANDOM_ROOT_PASSWORD=yes
env_file:
- db.env
app:
build: ./app
restart: always
volumes:
- friendica:/var/www/html
environment:
- AUTOINSTALL=true
- MAILNAME=
- TZ=
- LANGUAGE=
env_file:
- db.env
depends_on:
- db
hostname: friendica.local
cron:
build: ./app
restart: always
volumes:
- friendica:/var/www/html
entrypoint: /cron.sh
environment:
- MAILNAME=
- TZ=
- LANGUAGE=
env_file:
- db.env
depends_on:
- db
- app
hostname: friendica.local
web:
image: nginx
restart: always
volumes:
- friendica:/var/www/html:ro
- ./web/nginx.conf:/etc/nginx/nginx.conf:ro
depends_on:
- app
networks:
- default
- proxy-tier
labels:
- "traefik.backend=friendica"
- "traefik.frontend.entryPoints=https,http"
- "traefik.frontend.headers.STSSeconds=15768000"
- "traefik.frontend.headers.STSIncludeSubdomains=false"
- "traefik.frontend.headers.forceSTSHeader=true"
- "traefik.friendica.frontend.rule=Host:friendica.local"
- "traefik.friendica.frontend.port=80"
- "traefik.enable=true"
- "traefik.docker.network=proxy-tier"
proxy:
build: ./proxy
restart: always
ports:
- "80:80"
- "443:443"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
container_name: traefik
networks:
- default
- proxy-tier
volumes:
db:
friendica:
networks:
version: '2.1'
services:
db:
image: mariadb
restart: always
volumes:
- db:/var/lib/mysql/
environment:
- MYSQL_RANDOM_ROOT_PASSWORD=yes
env_file:
- db.env
app:
build: ./app
restart: always
volumes:
- friendica:/var/www/html
environment:
- FRIENDICA_ADMIN_MAIL=
- FRIENDICA_TZ=
- FRIENDICA_LANG=
env_file:
- db.env
depends_on:
- db
hostname: friendica.local
cron:
build: ./app
restart: always
volumes:
- friendica:/var/www/html
entrypoint: /cron.sh
environment:
- MAILNAME=
- TZ=
- LANGUAGE=
env_file:
- db.env
depends_on:
- db
- app
hostname: friendica.local
web:
image: nginx
restart: always
volumes:
- friendica:/var/www/html:ro
- ./web/nginx.conf:/etc/nginx/nginx.conf:ro
depends_on:
- app
networks:
- default
- proxy-tier
labels:
- "traefik.backend=friendica"
- "traefik.frontend.entryPoints=https,http"
- "traefik.frontend.headers.STSSeconds=15768000"
- "traefik.frontend.headers.STSIncludeSubdomains=false"
- "traefik.frontend.headers.forceSTSHeader=true"
- "traefik.friendica.frontend.rule=Host:friendica.local"
- "traefik.friendica.frontend.port=80"
- "traefik.enable=true"
- "traefik.docker.network=proxy-tier"
proxy:
build: ./proxy
restart: always
ports:
- "80:80"
- "443:443"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
container_name: traefik
networks:
- default
- proxy-tier
volumes:
db:
friendica:
networks:
proxy-tier: