2021-03-29 21:50:22 +01:00
|
|
|
# Docker Installation
|
|
|
|
|
|
|
|
## Installation with Docker
|
|
|
|
|
2021-04-14 15:45:03 +01:00
|
|
|
This installation method requires
|
2021-03-29 21:50:22 +01:00
|
|
|
[Docker](https://docs.docker.com/engine/install/) and [Docker
|
|
|
|
Compose](https://docs.docker.com/compose/install/). Use
|
|
|
|
`bin/configure` and pick `docker`, which enables all needed services
|
2021-04-14 15:45:03 +01:00
|
|
|
as containers, or `mixed` which lets you pick which services you'd
|
2021-03-29 21:50:22 +01:00
|
|
|
like to create containers for. This way you can use services in the
|
|
|
|
host machine, which may be useful if your host already has a
|
|
|
|
webserver, for instance.
|
|
|
|
|
2021-03-29 23:16:00 +01:00
|
|
|
If you elect to not use some service containers, check [Instal without
|
|
|
|
Docker with shell access](./install/no_docker_shell.md) for details on
|
|
|
|
the configuration of each service.
|
|
|
|
|
2021-04-14 15:45:03 +01:00
|
|
|
Please remember that for the installation `configure` script to use docker,
|
|
|
|
it is necessary that the executing user is in the docker group.
|
|
|
|
|
2021-03-29 21:50:22 +01:00
|
|
|
## Prerequisites
|
|
|
|
|
|
|
|
In order to host your GNU social instance, you'll need a domain:
|
|
|
|
- DNS domain
|
|
|
|
- `docker`
|
|
|
|
- `docker-compose`
|
|
|
|
|
|
|
|
If you don't have a fixed public IP, for local hosting or development,
|
|
|
|
or if you're behind a NAT, use a dynamic DNS solutions. Search for
|
2021-04-14 15:45:03 +01:00
|
|
|
`GnuDIP host` or `dynamic dns`. To use GnuDIP, [clone](https://notabug.org/someonewithpc/gnudip.git), then inspect and run
|
2021-03-29 21:50:22 +01:00
|
|
|
the `./install.sh` script. This allows you to have a domain that
|
|
|
|
dynamically points to your IP address.
|
|
|
|
|
2021-04-14 15:45:03 +01:00
|
|
|
If you want to install locally for development or experimenting purposes,
|
|
|
|
you can use `localhost` as the `root domain` while configuring the installation.
|
|
|
|
If you then specify a subdomain, don't forget to add it in the `/etc/hosts` file.
|
|
|
|
|
2021-03-29 23:16:00 +01:00
|
|
|
{{#include dns.md}}
|
2021-03-29 21:50:22 +01:00
|
|
|
|
2021-03-29 23:16:00 +01:00
|
|
|
{{#include tls.md}}
|
2021-03-29 21:50:22 +01:00
|
|
|
|
2021-03-29 23:16:00 +01:00
|
|
|
{{#include no_tls.md}}
|
2021-03-29 21:50:22 +01:00
|
|
|
|
|
|
|
## Configuration
|
|
|
|
|
2021-03-29 23:16:00 +01:00
|
|
|
{{#include bin-configure.md}}
|
|
|
|
|
|
|
|
## Permissions
|
2021-03-29 21:50:22 +01:00
|
|
|
|
2021-03-29 23:16:00 +01:00
|
|
|
The PHP docker container needs the GNU social folder to be owned by
|
|
|
|
the group 82 (www-data).
|
2021-03-29 21:50:22 +01:00
|
|
|
|
|
|
|
## Running
|
|
|
|
|
|
|
|
If you elected to use all or some containers, run `docker-compose up`
|
|
|
|
from the root of the project (the folder where the `.git` folder is).
|
|
|
|
In this form, the application can be stopped by pressing `C-c` (`^C`,
|
|
|
|
`CTRL + C`); pressing it again will force the containers to stop
|
|
|
|
immediately. However, this form will show you all logs, but in most
|
|
|
|
cases, you won't want to see those all the time. For that, run
|
|
|
|
`docker-compose up -d` from the same directory; The application can
|
|
|
|
then be stopped with `docker-compose down`.
|
|
|
|
|