Merge branch 'master' into dynamic-config-docs
This commit is contained in:
@@ -1,11 +1,8 @@
|
|||||||
FROM elixir:1.11.4-alpine
|
FROM elixir:1.11.4-alpine
|
||||||
|
|
||||||
ENV UID=911 GID=911 \
|
|
||||||
MIX_ENV=prod
|
|
||||||
|
|
||||||
ARG PLEROMA_VER=develop
|
ARG PLEROMA_VER=develop
|
||||||
ENV UID=911 GID=911 MIX_ENV=prod
|
ARG UID=911
|
||||||
|
ARG GID=911
|
||||||
ENV MIX_ENV=prod
|
ENV MIX_ENV=prod
|
||||||
|
|
||||||
RUN echo "http://nl.alpinelinux.org/alpine/latest-stable/community" >> /etc/apk/repositories \
|
RUN echo "http://nl.alpinelinux.org/alpine/latest-stable/community" >> /etc/apk/repositories \
|
||||||
@@ -40,4 +37,4 @@ COPY ./config.exs /etc/pleroma/config.exs
|
|||||||
|
|
||||||
EXPOSE 4000
|
EXPOSE 4000
|
||||||
|
|
||||||
ENTRYPOINT ["/pleroma/docker-entrypoint.sh"]
|
ENTRYPOINT ["/pleroma/docker-entrypoint.sh"]
|
||||||
|
14
README.md
14
README.md
@@ -49,12 +49,19 @@ services:
|
|||||||
- ./postgres:/var/lib/postgresql/data
|
- ./postgres:/var/lib/postgresql/data
|
||||||
|
|
||||||
web:
|
web:
|
||||||
build: .
|
|
||||||
image: pleroma
|
image: pleroma
|
||||||
container_name: pleroma_web
|
container_name: pleroma_web
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
- '4000:4000'
|
- '4000:4000'
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
# Feel free to remove or override this section
|
||||||
|
# See 'Build-time variables' in README.md
|
||||||
|
args:
|
||||||
|
- "UID=911"
|
||||||
|
- "GID=911"
|
||||||
|
- "PLEROMA_VER=develop"
|
||||||
volumes:
|
volumes:
|
||||||
- ./uploads:/var/lib/pleroma/uploads
|
- ./uploads:/var/lib/pleroma/uploads
|
||||||
- ./static:/var/lib/pleroma/static
|
- ./static:/var/lib/pleroma/static
|
||||||
@@ -97,7 +104,7 @@ docker-compose build
|
|||||||
docker build -t pleroma .
|
docker build -t pleroma .
|
||||||
```
|
```
|
||||||
|
|
||||||
I prefer the latter because it's more verbose.
|
I prefer the latter because it's more verbose but this will ignore any build-time variables you have set in `docker-compose.yml`.
|
||||||
|
|
||||||
You can now launch your instance:
|
You can now launch your instance:
|
||||||
|
|
||||||
@@ -144,10 +151,13 @@ docker build -t pleroma . --build-arg PLEROMA_VER=v2.0.7 # a version
|
|||||||
|
|
||||||
`a9203ab3` being the hash of the commit. (They're [here](https://git.pleroma.social/pleroma/pleroma/commits/develop))
|
`a9203ab3` being the hash of the commit. (They're [here](https://git.pleroma.social/pleroma/pleroma/commits/develop))
|
||||||
|
|
||||||
|
This value can also be set through `docker-compose.yml` as seen in the example file provided in this repository.
|
||||||
|
|
||||||
## Config Override
|
## Config Override
|
||||||
By default the provided `docker-compose.yml` file mounts `config.exs` in the Pleroma container, this file is a dynamic configuration that sources some values from the environment variables provided to the container (variables like `ADMIN_EMAIL` etc.).
|
By default the provided `docker-compose.yml` file mounts `config.exs` in the Pleroma container, this file is a dynamic configuration that sources some values from the environment variables provided to the container (variables like `ADMIN_EMAIL` etc.).
|
||||||
|
|
||||||
For those that want to change configuration that is not exposed through environment variables there is the option to mount the `config-override.exs` file which can than be modified to your satisfaction. Values set in this file will override anything set in `config.exs`. The override file provided in this repository disables new registrations on your instance, as an example.
|
For those that want to change configuration that is not exposed through environment variables there is the option to mount the `config-override.exs` file which can than be modified to your satisfaction. Values set in this file will override anything set in `config.exs`. The override file provided in this repository disables new registrations on your instance, as an example.
|
||||||
|
=======
|
||||||
|
|
||||||
## Other Docker images
|
## Other Docker images
|
||||||
|
|
||||||
|
@@ -5,6 +5,8 @@ services:
|
|||||||
image: postgres:12.1-alpine
|
image: postgres:12.1-alpine
|
||||||
container_name: pleroma_db
|
container_name: pleroma_db
|
||||||
restart: always
|
restart: always
|
||||||
|
healthcheck:
|
||||||
|
test: ["CMD", "pg_isready", "-U", "pleroma"]
|
||||||
environment:
|
environment:
|
||||||
POSTGRES_USER: pleroma
|
POSTGRES_USER: pleroma
|
||||||
POSTGRES_PASSWORD: ChangeMe!
|
POSTGRES_PASSWORD: ChangeMe!
|
||||||
@@ -13,12 +15,25 @@ services:
|
|||||||
- ./postgres:/var/lib/postgresql/data
|
- ./postgres:/var/lib/postgresql/data
|
||||||
|
|
||||||
web:
|
web:
|
||||||
build: .
|
|
||||||
image: pleroma
|
image: pleroma
|
||||||
container_name: pleroma_web
|
container_name: pleroma_web
|
||||||
|
healthcheck:
|
||||||
|
test:
|
||||||
|
[
|
||||||
|
"CMD-SHELL",
|
||||||
|
"wget -q --spider --proxy=off localhost:4000 || exit 1",
|
||||||
|
]
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
- '4000:4000'
|
- '4000:4000'
|
||||||
|
build:
|
||||||
|
context: .
|
||||||
|
# Feel free to remove or override this section
|
||||||
|
# See 'Build-time variables' in README.md
|
||||||
|
args:
|
||||||
|
- "UID=1000"
|
||||||
|
- "GID=1000"
|
||||||
|
- "PLEROMA_VER=v2.4.2"
|
||||||
volumes:
|
volumes:
|
||||||
- ./uploads:/var/lib/pleroma/uploads
|
- ./uploads:/var/lib/pleroma/uploads
|
||||||
- ./static:/var/lib/pleroma/static
|
- ./static:/var/lib/pleroma/static
|
||||||
@@ -32,4 +47,4 @@ services:
|
|||||||
DB_PASS: ChangeMe!
|
DB_PASS: ChangeMe!
|
||||||
DB_NAME: pleroma
|
DB_NAME: pleroma
|
||||||
depends_on:
|
depends_on:
|
||||||
- db
|
- db
|
||||||
|
Reference in New Issue
Block a user