mirror of
https://github.com/friendica/docker
synced 2025-02-05 06:59:25 +01:00
Update README/stack & remove deployment binaries
This commit is contained in:
parent
7adb58feb3
commit
a9d96e0dbe
6 changed files with 45 additions and 69 deletions
|
@ -1 +0,0 @@
|
||||||
Namespace: friendica
|
|
|
@ -1,21 +0,0 @@
|
||||||
# Special settings for DEV/RC images
|
|
||||||
|
|
||||||
The `*-dev` and `*-rc` branches are having additional possibilities to get the latest sources of Friendica.
|
|
||||||
|
|
||||||
## Possible Environment Variables
|
|
||||||
|
|
||||||
The following environment variables are possible for these kind of images too:
|
|
||||||
|
|
||||||
**Develop/Release Candidat Settings**
|
|
||||||
- `FRIENDICA_UPGRADE` If set to `true`, a develop or release candidat node will get updated at startup.
|
|
||||||
- `FRIENDICA_REPOSITORY` If set, a custom repository will be chosen (Default: `friendica`)
|
|
||||||
- `FRIENDICA_ADDONS_REPO` If set, a custom repository for the addons will be chosen (Default: `friendica`)
|
|
||||||
- `FRIENDICA_VERSION` If set, a custom branch will be chosen (Default is based on the chosen image version)
|
|
||||||
- `FRIENDICA_ADDONS` If set, a custom branch for the addons will be chosen (Default is based on the chosen image version)
|
|
||||||
|
|
||||||
## Updating to a newer version
|
|
||||||
|
|
||||||
You don't need to pull the image for each commit in [friendica](https://github.com/friendica/friendica/).
|
|
||||||
Instead, the release candidate or develop branch will get updated if no installation was found or the environment variable `FRIENDICA_UPGRADE` is set to `true`.
|
|
||||||
|
|
||||||
It will clone the latest Friendica version and copy it to your working directory.
|
|
|
@ -17,7 +17,7 @@ All changes in such folders will get overwritten during an update.
|
||||||
Creates a directory and the necessary files for each combination of version (2018.05-rc, 3.6, ...) and variant (apache, fpm, fpm-alpine):
|
Creates a directory and the necessary files for each combination of version (2018.05-rc, 3.6, ...) and variant (apache, fpm, fpm-alpine):
|
||||||
|
|
||||||
- Creating the right `Dockerfile` (from one of the two *.template files)
|
- Creating the right `Dockerfile` (from one of the two *.template files)
|
||||||
- Copy each shell and *.exclude file in `.docker-files/`
|
- Copy each config file in `.config/`
|
||||||
- Recreating the version/variant environment in `.travis.yml`
|
- Recreating the version/variant environment in `.travis.yml`
|
||||||
|
|
||||||
If you want to update the Docker-images to a newer version, just change the list in `update.sh` at
|
If you want to update the Docker-images to a newer version, just change the list in `update.sh` at
|
||||||
|
@ -30,6 +30,7 @@ versions=(
|
||||||
# `generate-stackbrew-library.sh`
|
# `generate-stackbrew-library.sh`
|
||||||
|
|
||||||
This file automatically creates a "manifest" for the docker-images.
|
This file automatically creates a "manifest" for the docker-images.
|
||||||
|
This "manifest" is used to create a new PR in the official-images [repository](https://github.com/docker-library/official-images/) for deploying the changes to the docker hub.
|
||||||
Like:
|
Like:
|
||||||
|
|
||||||
```console
|
```console
|
||||||
|
@ -53,11 +54,3 @@ GitCommit: b46fae917321394e1482df59dc4e39daffbe5c59
|
||||||
Directory: 2018.05-rc/fpm-alpine
|
Directory: 2018.05-rc/fpm-alpine
|
||||||
This is the input-file for the official-images in a later step :-)
|
This is the input-file for the official-images in a later step :-)
|
||||||
```
|
```
|
||||||
|
|
||||||
# `build_and_push.sh`
|
|
||||||
|
|
||||||
This file automatically builds and publish all docker image variants (apache, fpm, ...) and versions (stable, latest, dev, ...)
|
|
||||||
|
|
||||||
It uses [bashbrew](https://github.com/docker-library/official-images/tree/master/bashbrew) for building and publishing and `generate-stackbrew-library.sh` for the definition (manifest) what to build and publish.
|
|
||||||
|
|
||||||
See [Instruction format](https://github.com/docker-library/official-images/blob/master/README.md#instruction-format) for more background information.
|
|
64
README.md
64
README.md
|
@ -1,8 +1,3 @@
|
||||||
# Docker Image for Friendica
|
|
||||||
[![Build Status Travis](https://travis-ci.org/friendica/docker.svg?branch=master)](https://travis-ci.org/friendica/docker)
|
|
||||||
|
|
||||||
This repository holds the official Docker Image for [Friendica](https://friendi.ca)
|
|
||||||
|
|
||||||
# What is Friendica?
|
# What is Friendica?
|
||||||
|
|
||||||
Friendica is a decentralised communications platform that integrates social communication.
|
Friendica is a decentralised communications platform that integrates social communication.
|
||||||
|
@ -23,8 +18,7 @@ The second option is a `fpm` container.
|
||||||
It is based on the [php-fpm](https://hub.docker.com/_/php/) image and runs a fastCGI-Process that serves your Friendica server.
|
It is based on the [php-fpm](https://hub.docker.com/_/php/) image and runs a fastCGI-Process that serves your Friendica server.
|
||||||
To use this image it must be combined with any Webserver that can proxy the http requests to the FastCGI-port of the container.
|
To use this image it must be combined with any Webserver that can proxy the http requests to the FastCGI-port of the container.
|
||||||
|
|
||||||
[![Try in PWD](https://github.com/play-with-docker/stacks/raw/cff22438cb4195ace27f9b15784bbb497047afa7/assets/images/button.png)](http://play-with-docker.com?stack=https://raw.githubusercontent.com/nupplaphil/friendica-docker/fec33c98be957436279b7074ca08068b18622627/stack.yml)
|
[![Try in PWD](https://github.com/play-with-docker/stacks/raw/cff22438cb4195ace27f9b15784bbb497047afa7/assets/images/button.png)](http://play-with-docker.com?stack=https://raw.githubusercontent.com/friendica/docker/master/stack.yml) (Admin-E-Mail: `root@friendica.local`)
|
||||||
(Admin-E-Mail: `root@friendica.local`)
|
|
||||||
|
|
||||||
## Using the apache image
|
## Using the apache image
|
||||||
|
|
||||||
|
@ -34,7 +28,7 @@ The apache image contains a webserver and exposes port 80.
|
||||||
To start the container type:
|
To start the container type:
|
||||||
|
|
||||||
```console
|
```console
|
||||||
$ docker run -d -p 8080:80 --network some-network friendica/server
|
$ docker run -d -p 8080:80 --network some-network friendica
|
||||||
```
|
```
|
||||||
|
|
||||||
Now you can access the Friendica installation wizard at http://localhost:8080/ from your host system.
|
Now you can access the Friendica installation wizard at http://localhost:8080/ from your host system.
|
||||||
|
@ -49,7 +43,7 @@ If you use another container, make sure that you add them to the same docker net
|
||||||
In both cases you don't want to map the fpm port to you host.
|
In both cases you don't want to map the fpm port to you host.
|
||||||
|
|
||||||
```console
|
```console
|
||||||
$ docker run -d friendica/server:fpm
|
$ docker run -d friendica:fpm
|
||||||
```
|
```
|
||||||
|
|
||||||
As the fastCGI-Process is not capable of serving static files (style sheets, images, ...) the webserver needs access to these files.
|
As the fastCGI-Process is not capable of serving static files (style sheets, images, ...) the webserver needs access to these files.
|
||||||
|
@ -67,7 +61,8 @@ There are three options to enable the cron-job for Friendica:
|
||||||
## Possible Environment Variables
|
## Possible Environment Variables
|
||||||
|
|
||||||
**Friendica Settings**
|
**Friendica Settings**
|
||||||
- `FRIENDICA_URL` The Friendica URL path.
|
|
||||||
|
- `FRIENDICA_URL` The Friendica URL.
|
||||||
- `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.
|
||||||
|
@ -76,11 +71,13 @@ There are three options to enable the cron-job for Friendica:
|
||||||
- `FRIENDICA_DATA_DIR` The data directory of the Friendica server (Default: /var/www/data).
|
- `FRIENDICA_DATA_DIR` The data directory of the Friendica server (Default: /var/www/data).
|
||||||
|
|
||||||
**Friendica Logging**
|
**Friendica Logging**
|
||||||
|
|
||||||
- `FRIENDICA_DEBUGGING` If set to `true`, the logging of Friendica is enabled.
|
- `FRIENDICA_DEBUGGING` If set to `true`, the logging of Friendica is enabled.
|
||||||
- `FRIENDICA_LOGFILE` (optional) The path to the logfile (Default: /var/www/friendica.log).
|
- `FRIENDICA_LOGFILE` (optional) The path to the logfile (Default: /var/www/friendica.log).
|
||||||
- `FRIENDICA_LOGLEVEL` (optional) The loglevel to log (Default: notice).
|
- `FRIENDICA_LOGLEVEL` (optional) The loglevel to log (Default: notice).
|
||||||
|
|
||||||
**Database** (**required at installation**)
|
**Database** (**required at installation**)
|
||||||
|
|
||||||
- `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.
|
||||||
- `MYSQL_DATABASE` Name of the database using mysql / mariadb.
|
- `MYSQL_DATABASE` Name of the database using mysql / mariadb.
|
||||||
|
@ -88,6 +85,7 @@ There are three options to enable the cron-job for Friendica:
|
||||||
- `MYSQL_PORT` Port of the database server using mysql / mariadb (Default: `3306`)
|
- `MYSQL_PORT` Port of the database server using mysql / mariadb (Default: `3306`)
|
||||||
|
|
||||||
**Lock Driver (Redis)**
|
**Lock Driver (Redis)**
|
||||||
|
|
||||||
- `REDIS_HOST` The hostname of the redis instance (in case of locking).
|
- `REDIS_HOST` The hostname of the redis instance (in case of locking).
|
||||||
- `REDIS_PORT` (optional) The port of the redis instance (in case of locking).
|
- `REDIS_PORT` (optional) The port of the redis instance (in case of locking).
|
||||||
- `REDIS_PW` (optional) The password for the redis instance (in case of locking).
|
- `REDIS_PW` (optional) The password for the redis instance (in case of locking).
|
||||||
|
@ -126,7 +124,6 @@ You have to add the Friendica container to the same network as the running datab
|
||||||
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 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/...`.
|
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.
|
That means your data is saved even if the container crashes, is stopped or deleted.
|
||||||
|
|
||||||
To make your data persistent to upgrading and get access for backups is using named docker volume or mount a host folder.
|
To make your data persistent to upgrading and get access for backups is using named docker volume or mount a host folder.
|
||||||
To achieve this you need one volume for your database container and Friendica.
|
To achieve this you need one volume for your database container and Friendica.
|
||||||
|
|
||||||
|
@ -138,7 +135,7 @@ Friendica:
|
||||||
$ docker run -d \
|
$ docker run -d \
|
||||||
-v friendica-vol-1:/var/www/html \
|
-v friendica-vol-1:/var/www/html \
|
||||||
--network some-network
|
--network some-network
|
||||||
friendica/server
|
friendica
|
||||||
```
|
```
|
||||||
|
|
||||||
Database:
|
Database:
|
||||||
|
@ -156,11 +153,7 @@ $ docker run -d \
|
||||||
|
|
||||||
The Friendica image supports auto configuration via environment variables.
|
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, there are two possibilities:
|
To enable the automatic installation, you have to the following environment variables:
|
||||||
|
|
||||||
### Environment Variables
|
|
||||||
|
|
||||||
You have to set at least the following environment variables (others are optional).
|
|
||||||
|
|
||||||
- `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.
|
||||||
|
@ -168,11 +161,6 @@ You have to set at least the following environment variables (others are optiona
|
||||||
- `MYSQL_DATABASE` Name of the database using mysql / mariadb.
|
- `MYSQL_DATABASE` Name of the database using mysql / mariadb.
|
||||||
- `MYSQL_HOST` Hostname of the database server using mysql / mariadb.
|
- `MYSQL_HOST` Hostname of the database server using mysql / mariadb.
|
||||||
|
|
||||||
### Using a predefined config file
|
|
||||||
|
|
||||||
You can create a `local.config.php` and `COPY` it to `/usr/src/config`.
|
|
||||||
If no other environment variable is set, this `local.config.php` will get copied to the config path.
|
|
||||||
|
|
||||||
# Maintenance of the image
|
# Maintenance of the image
|
||||||
|
|
||||||
## Updating to a newer version
|
## Updating to a newer version
|
||||||
|
@ -214,7 +202,7 @@ services:
|
||||||
- MYSQL_RANDOM_ROOT_PASSWORD=yes
|
- MYSQL_RANDOM_ROOT_PASSWORD=yes
|
||||||
|
|
||||||
app:
|
app:
|
||||||
image: friendica/server
|
image: friendica
|
||||||
restart: always
|
restart: always
|
||||||
volumes:
|
volumes:
|
||||||
- friendica:/var/www/html
|
- friendica:/var/www/html
|
||||||
|
@ -251,8 +239,9 @@ An example can be found in the [examples section](https://github.com/friendica/d
|
||||||
As this setup does **not include encryption** it should to be run behind a proxy.
|
As this setup does **not include encryption** it should to be run behind a proxy.
|
||||||
|
|
||||||
Prerequisites for this example:
|
Prerequisites for this example:
|
||||||
- Make sure to set the variable `MYSQL_PASSWORD` before you run the setup.
|
|
||||||
- Create a `nginx.conf` in the same directory as the docker-compose.yml file (take it from [example](https://github.com/friendica/docker/tree/master/.examples/docker-compose/with-traefik-proxy/mariadb-cron-smtp/fpm/web/nginx.conf))
|
- Make sure to set the variable `MYSQL_PASSWORD` and `MYSQL_USER` before you run the setup.
|
||||||
|
- Create a `nginx.conf` in the same directory as the docker-compose.yml file (take it from [example](https://github.com/friendica/docker/tree/master/.examples/docker-compose/with-traefik-proxy/mariadb-cron-smtp/fpm/web/nginx.conf))
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
version: '2'
|
version: '2'
|
||||||
|
@ -270,7 +259,7 @@ services:
|
||||||
- MYSQL_RANDOM_ROOT_PASSWORD=yes
|
- MYSQL_RANDOM_ROOT_PASSWORD=yes
|
||||||
|
|
||||||
app:
|
app:
|
||||||
image: friendica/server:fpm
|
image: friendica:fpm
|
||||||
restart: always
|
restart: always
|
||||||
volumes:
|
volumes:
|
||||||
- friendica:/var/www/html
|
- friendica:/var/www/html
|
||||||
|
@ -307,6 +296,29 @@ networks:
|
||||||
|
|
||||||
Then run `docker-compose up -d`, now you can access Friendica at http://localhost:8080/ from your system.
|
Then run `docker-compose up -d`, now you can access Friendica at http://localhost:8080/ from your system.
|
||||||
|
|
||||||
|
# Special settings for DEV/RC images
|
||||||
|
|
||||||
|
The `*-dev` and `*-rc` branches are having additional possibilities to get the latest sources of Friendica.
|
||||||
|
|
||||||
|
## Possible Environment Variables
|
||||||
|
|
||||||
|
The following environment variables are possible for these kind of images too:
|
||||||
|
|
||||||
|
**Develop/Release Candidate Settings**
|
||||||
|
|
||||||
|
- `FRIENDICA_UPGRADE` If set to `true`, a develop or release candidat node will get updated at startup.
|
||||||
|
- `FRIENDICA_REPOSITORY` If set, a custom repository will be chosen (Default: `friendica`)
|
||||||
|
- `FRIENDICA_ADDONS_REPO` If set, a custom repository for the addons will be chosen (Default: `friendica`)
|
||||||
|
- `FRIENDICA_VERSION` If set, a custom branch will be chosen (Default is based on the chosen image version)
|
||||||
|
- `FRIENDICA_ADDONS` If set, a custom branch for the addons will be chosen (Default is based on the chosen image version)
|
||||||
|
|
||||||
|
## Updating to a newer version
|
||||||
|
|
||||||
|
You don't need to pull the image for each commit in [friendica](https://github.com/friendica/friendica/).
|
||||||
|
Instead, the release candidate or develop branch will get updated if no installation was found or the environment variable `FRIENDICA_UPGRADE` is set to `true`.
|
||||||
|
|
||||||
|
It will clone the latest Friendica version and copy it to your working directory.
|
||||||
|
|
||||||
# Questions / Issues
|
# Questions / Issues
|
||||||
|
|
||||||
If you got any questions or problems using the image, please visit our [Github Repository](https://github.com/friendica/docker) and write an issue.
|
If you got any questions or problems using the image, please visit our [Github Repository](https://github.com/friendica/docker) and write an issue.
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
#!/bin/bash
|
|
||||||
set -e
|
|
||||||
|
|
||||||
echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
|
|
||||||
./generate-stackbrew-library.sh > server
|
|
||||||
bashbrew --config .bashbrew/ --library ./ build server
|
|
||||||
bashbrew --config .bashbrew/ --library ./ push server
|
|
|
@ -13,7 +13,7 @@ services:
|
||||||
- MYSQL_RANDOM_ROOT_PASSWORD=yes
|
- MYSQL_RANDOM_ROOT_PASSWORD=yes
|
||||||
|
|
||||||
app:
|
app:
|
||||||
image: friendica/server:dev-apache
|
image: friendica:apache
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
- 8080:80
|
- 8080:80
|
||||||
|
@ -32,7 +32,7 @@ services:
|
||||||
- db
|
- db
|
||||||
|
|
||||||
cron:
|
cron:
|
||||||
image: friendica/server:dev-apache
|
image: friendica:apache
|
||||||
restart: always
|
restart: always
|
||||||
volumes:
|
volumes:
|
||||||
- friendica:/var/www/html
|
- friendica:/var/www/html
|
||||||
|
|
Loading…
Reference in a new issue