mirror of
https://github.com/jrasanen/writefreely-docker.git
synced 2025-02-05 08:52:46 +02:00
Document all environment variables available
This commit is contained in:
parent
05b1621042
commit
0f4b06fa8f
1 changed files with 40 additions and 41 deletions
79
README.md
79
README.md
|
@ -1,56 +1,55 @@
|
||||||
# writefreely-docker
|
# WriteFreely Docker Build
|
||||||
|
|
||||||
[![Source](https://img.shields.io/badge/source-git-brightgreen?style=flat-square)](https://git.madhouse-project.org/algernon/writefreely-docker)
|
This project builds a Docker image for [WriteFreely](https://github.com/writefreely/writefreely), a minimalist, privacy-focused, and federated blogging platform. The image is uses on Alpine Linux.
|
||||||
|
|
||||||
This is a [Docker][docker] image for [WriteFreely][writefreely], set up in a way
|
|
||||||
that makes it easier to deploy it in production, including the initial setup step.
|
|
||||||
|
|
||||||
[docker]: https://www.docker.com/
|
|
||||||
[writefreely]: https://github.com/writeas/writefreely
|
|
||||||
|
|
||||||
## Overview
|
|
||||||
|
|
||||||
The image is set up to use SQLite for the database, it does not support MySQL
|
|
||||||
out of the box - but you can always provide your own `config.ini`. The config
|
|
||||||
file, the database, and the generated keys are all stored on the single volume
|
|
||||||
the image uses, mounted on `/data`.
|
|
||||||
|
|
||||||
The primary purpose of the image is to provide a single-step setup and upgrade
|
|
||||||
experience, where the initial setup and any upgrades are handled by the image
|
|
||||||
itself. As such, the image will create a default `config.ini` unless one already
|
|
||||||
exists, with reasonable defaults. It will also run database migrations, and save
|
|
||||||
a backup before doing so (which it will delete, if no migrations were
|
|
||||||
necessary).
|
|
||||||
|
|
||||||
## Getting s tarted
|
## Getting s tarted
|
||||||
|
|
||||||
To get started, the easiest way to test it out is running the following command:
|
To get started, the easiest way to test it out is running the following command:
|
||||||
|
|
||||||
```shell
|
```bash
|
||||||
docker run -p 8080:8080 -it --rm -v /some/path/to/data:/data \
|
docker run -p 8080:8080 -it --rm -v /some/path/to/data:/data \
|
||||||
algernon/writefreely
|
jrasanen/writefreely
|
||||||
```
|
```
|
||||||
|
|
||||||
Then point your browser to `http://localhost:8080`, and you should see
|
Then point your browser to http://localhost:8080, and you should see WriteFreely up and running.
|
||||||
WriteFreely up and running.
|
|
||||||
|
|
||||||
## Setup
|
## Setup
|
||||||
|
|
||||||
The image will perform an initial setup, unless the supplied volume already
|
The image will perform an initial setup, unless the supplied volume already contains a config.ini. Settings can be tweaked via environment variables, of which you can find a list below. Do note that these environment variables are only used for the initial setup as of this writing! If a configuration file already exists, the environment variables will be blissfully ignored.
|
||||||
contains a `config.ini`. Settings can be tweaked via environment variables, of
|
|
||||||
which you can find a list below. Do note that these environment variables are
|
|
||||||
*only* used for the initial setup as of this writing! If a configuration file
|
|
||||||
already exists, the environment variables will be blissfully ignored.
|
|
||||||
|
|
||||||
### Environment variables
|
### Environment variables
|
||||||
|
|
||||||
- `WRITEFREELY_BIND_HOST` and `WRITEFREELY_BIND_PORT` determine the host and port WriteFreely will bind to. Defaults to `0.0.0.0` and `8080`, respectively.
|
The following variables will be used to construct the `config.ini` on first start. After it has been configured, you can edit it on the volume.
|
||||||
- `WRITEFREELY_SITE_NAME` is the site title one wants. Defaults to "A Writefreely blog".
|
|
||||||
- `WRITEFREELY_SINGLE_USER`, `WRITEFREELY_OPEN_REGISTRATION`,
|
|
||||||
`WRITEFREELY_MIN_USERNAME_LEN`, `WRITEFREELY_MAX_BLOG`,
|
|
||||||
`WRITEFREELY_FEDERATION`, `WRITEFREELY_PUBLIC_STATS`, `WRITEFREELY_PRIVATE`,
|
|
||||||
`WRITEFREELY_LOCAL_TIMELINE`, and `WRITEFREELY_USER_INVITES` all correspond to
|
|
||||||
the similarly named `config.ini` settings. See the [WriteFreely docs][wf:docs]
|
|
||||||
for more information about them.
|
|
||||||
|
|
||||||
[wf:docs]: https://writefreely.org/docs/latest/admin/config
|
## General Configuration
|
||||||
|
|
||||||
|
- **`WRITEFREELY_BIND_PORT`**: Specifies the port on which the WriteFreely server will listen. Defaults to `8080`.
|
||||||
|
- **`WRITEFREELY_BIND_HOST`**: Defines the host IP to bind to. Defaults to `0.0.0.0`.
|
||||||
|
- **`WRITEFREELY_SITE_NAME`**: Sets the name of your WriteFreely site. Used to identify the site in federation.
|
||||||
|
- **`WRITEFREELY_SITE_DESCRIPTION`**: Provides a short description of your site. This description may be used in federated networks.
|
||||||
|
|
||||||
|
## Database Configuration
|
||||||
|
|
||||||
|
- **`WRITEFREELY_DATABASE_DATABASE`**: Specifies the type of database used, such as `mysql` or `sqlite3`.
|
||||||
|
- **`WRITEFREELY_DATABASE_USERNAME`**: The username for the database.
|
||||||
|
- **`WRITEFREELY_DATABASE_PASSWORD`**: The password for the database.
|
||||||
|
- **`WRITEFREELY_DATABASE_NAME`**: The name of the database to connect to.
|
||||||
|
- **`WRITEFREELY_DATABASE_HOST`**: The hostname or IP address of the database server.
|
||||||
|
- **`WRITEFREELY_DATABASE_PORT`**: The port number on which the database server is running.
|
||||||
|
|
||||||
|
## Application Settings
|
||||||
|
|
||||||
|
- **`WRITEFREELY_HOST`**: The full URL where the site will be accessible.
|
||||||
|
- **`WRITEFREELY_SINGLE_USER`**: Set to `true` to run the instance as a single-user blog, otherwise `false`.
|
||||||
|
- **`WRITEFREELY_OPEN_REGISTRATION`**: Whether or not anyone can register via the landing page
|
||||||
|
- **`WRITEFREELY_MIN_USERNAME_LEN`**: The minimum length for usernames.
|
||||||
|
- **`WRITEFREELY_MAX_BLOG`**: Maximum number of blogs a single user can create under one account
|
||||||
|
- **`WRITEFREELY_FEDERATION`**: Whether or not federation via ActivityPub is enabled
|
||||||
|
- **`WRITEFREELY_PUBLIC_STATS`**: DWhether or not usage stats are made public via NodeInfo
|
||||||
|
- **`WRITEFREELY_PRIVATE`**: Set to `true` to make the site private.
|
||||||
|
- **`WRITEFREELY_LOCAL_TIMELINE`**: Whether or not the instance reader (and the Public option on blogs) is enabled
|
||||||
|
- **`WRITEFREELY_USER_INVITES`**: Who is allowed to send user invites, if anyone. A blank value disables invites for all users. Valid choices: empty, user, or admin
|
||||||
|
|
||||||
|
### Volumes
|
||||||
|
|
||||||
|
* `/data`: Directory where WriteFreely stores its data, including database files and configuration.
|
||||||
|
|
Loading…
Add table
Reference in a new issue