Skip to content

Commit 9417aa6

Browse files
committed
Add stack.yml and fixup README
1 parent 656ea9b commit 9417aa6

File tree

2 files changed

+67
-15
lines changed

2 files changed

+67
-15
lines changed

friendica/content.md

+15-15
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Friendica is a decentralised communications platform that integrates social communication. Our platform links to independent social projects and corporate services.
44

5-
![logo](https://cdn.rawgit.com/friendica/docker/9c954f4d/friendica.svg)
5+
%%LOGO%%
66

77
# How to use this image
88

@@ -12,7 +12,7 @@ The `apache` tag contains a full Friendica installation including an apache web
1212

1313
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. To use this image it must be combined with any Webserver that can proxy the http requests to the FastCGI-port of the container.
1414

15-
[![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) (Admin-E-Mail: `[email protected]`)
15+
[![Try in PWD](https://github.com/play-with-docker/stacks/raw/cff22438cb4195ace27f9b15784bbb497047afa7/assets/images/button.png)](http://play-with-docker.com?stack=%%STACK-URL%%) (Admin-E-Mail: `[email protected]`)
1616

1717
## Using the apache image
1818

@@ -21,7 +21,7 @@ You need at least one other mariadb/mysql-container to link it to Friendica.
2121
The apache image contains a webserver and exposes port 80. To start the container type:
2222

2323
```console
24-
$ docker run -d -p 8080:80 --link some-mysql:mysql friendica/server
24+
$ docker run -d -p 8080:80 --network some-network %%IMAGE%%
2525
```
2626

2727
Now you can access the Friendica installation wizard at http://localhost:8080/ from your host system.
@@ -31,7 +31,7 @@ Now you can access the Friendica installation wizard at http://localhost:8080/ f
3131
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). In both cases you don't want to map the fpm port to you host.
3232

3333
```console
34-
$ docker run -d friendica/server:fpm
34+
$ docker run -d %%IMAGE%%:fpm
3535
```
3636

3737
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.
@@ -48,10 +48,9 @@ There are three options to enable the cron-job for Friendica:
4848

4949
**Friendica Settings**
5050

51-
- `FRIENDICA_URL` The Friendica URL path.
51+
- `FRIENDICA_URL` The Friendica URL.
5252
- `FRIENDICA_TZ` The default localization of the Friendica server.
5353
- `FRIENDICA_LANG` The default language of the Friendica server.
54-
- `FRIENDICA_PHP_PATH` The path of the PHP binary.
5554
- `FRIENDICA_SITENAME` The Sitename of the Friendica server.
5655
- `FRIENDICA_NO_VALIDATION` If set to `true`, the URL and E-Mail validation will be disabled.
5756
- `FRIENDICA_DATA` If set to `true`, the fileystem will be used instead of the DB backend.
@@ -65,8 +64,7 @@ There are three options to enable the cron-job for Friendica:
6564

6665
**Database** (**required at installation**)
6766

68-
- `MYSQL_USERNAME` Username for the database user using mysql.
69-
- `MYSQL_USER` Username for the database user using mariadb.
67+
- `MYSQL_USER` Username for the database user using mysql / mariadb.
7068
- `MYSQL_PASSWORD` Password for the database user using mysql / mariadb.
7169
- `MYSQL_DATABASE` Name of the database using mysql / mariadb.
7270
- `MYSQL_HOST` Hostname of the database server using mysql / mariadb.
@@ -104,7 +102,7 @@ The following environment variables are possible for the SMTP examples.
104102

105103
## Database settings
106104

107-
You have to link a running database container, e. g. `--link my-mysql:mysql`, and then use `mysql` as the database host on setup.
105+
You have to add the Friendica container to the same network as the running database container, e. g. `--network some-network`, and then use `mysql` as the database host on setup.
108106

109107
## Persistent data
110108

@@ -117,7 +115,8 @@ Friendica:
117115
```console
118116
$ docker run -d \
119117
-v friendica-vol-1:/var/www/html \
120-
friendica/server
118+
--network some-network
119+
%%IMAGE%%
121120
```
122121

123122
Database:
@@ -127,6 +126,7 @@ Database:
127126
```console
128127
$ docker run -d \
129128
-v mysql-vol-1:/var/lib/mysql \
129+
--network some-network
130130
mariadb
131131
```
132132

@@ -135,7 +135,7 @@ $ docker run -d \
135135
The Friendica image supports auto configuration via environment variables. 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:
136136

137137
- `FRIENDICA_ADMIN_MAIL` E-Mail address of the administrator.
138-
- `MYSQL_USERNAME` or `MYSQL_USER` Username for the database user using mysql/mariadb.
138+
- `MYSQL_USER` Username for the database user using mysql / mariadb.
139139
- `MYSQL_PASSWORD` Password for the database user using mysql / mariadb.
140140
- `MYSQL_DATABASE` Name of the database using mysql / mariadb.
141141
- `MYSQL_HOST` Hostname of the database server using mysql / mariadb.
@@ -144,7 +144,7 @@ The Friendica image supports auto configuration via environment variables. You c
144144

145145
## Updating to a newer version
146146

147-
You have to pull the latest image from the hub (`docker pull friendica`). The stable branch gets checked at every startup and will get updated if no installation was found or a new image is used.
147+
You have to pull the latest image from the hub (`docker pull %%IMAGE%%`). The stable branch gets checked at every startup and will get updated if no installation was found or a new image is used.
148148

149149
# Running this image with docker-compose
150150

@@ -174,7 +174,7 @@ services:
174174
- MYSQL_RANDOM_ROOT_PASSWORD=yes
175175

176176
app:
177-
image: friendica/server
177+
image: %%IMAGE%%
178178
restart: always
179179
volumes:
180180
- friendica:/var/www/html
@@ -226,7 +226,7 @@ services:
226226
- MYSQL_RANDOM_ROOT_PASSWORD=yes
227227
228228
app:
229-
image: friendica/server:fpm
229+
image: %%IMAGE%%:fpm
230230
restart: always
231231
volumes:
232232
- friendica:/var/www/html
@@ -271,7 +271,7 @@ The `*-dev` and `*-rc` branches are having additional possibilities to get the l
271271

272272
The following environment variables are possible for these kind of images too:
273273

274-
**Develop/Release Candidat Settings**
274+
**Develop/Release Candidate Settings**
275275

276276
- `FRIENDICA_UPGRADE` If set to `true`, a develop or release candidat node will get updated at startup.
277277
- `FRIENDICA_REPOSITORY` If set, a custom repository will be chosen (Default: `friendica`)

friendica/stack.yml

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
version: '3.2'
2+
3+
services:
4+
db:
5+
image: mariadb
6+
restart: always
7+
volumes:
8+
- db:/var/lib/mysql
9+
environment:
10+
- MYSQL_USER=friendica
11+
- MYSQL_PASSWORD=friendica
12+
- MYSQL_DATABASE=friendica
13+
- MYSQL_RANDOM_ROOT_PASSWORD=yes
14+
15+
app:
16+
image: friendica:apache
17+
restart: always
18+
ports:
19+
- 8080:80
20+
volumes:
21+
- friendica:/var/www/html
22+
environment:
23+
- MYSQL_HOST=db
24+
- MYSQL_USER=friendica
25+
- MYSQL_PASSWORD=friendica
26+
- MYSQL_DATABASE=friendica
27+
28+
- SITENAME=Friendica PWD Test Node
29+
- FRIENDICA_NO_VALIDATION=true
30+
hostname: friendica.local
31+
depends_on:
32+
- db
33+
34+
cron:
35+
image: friendica:apache
36+
restart: always
37+
volumes:
38+
- friendica:/var/www/html
39+
entrypoint: /cron.sh
40+
environment:
41+
- MYSQL_HOST=db
42+
- MYSQL_USER=friendica
43+
- MYSQL_PASSWORD=friendica
44+
- MYSQL_DATABASE=friendica
45+
46+
- SITENAME=Friendica PWD Test Node
47+
depends_on:
48+
- db
49+
50+
volumes:
51+
db:
52+
friendica:

0 commit comments

Comments
 (0)