Skip to content

Commit ce315a1

Browse files
authored
Merge pull request #33 from linuxserver/aliases-main
2 parents 4541757 + 69301f7 commit ce315a1

7 files changed

Lines changed: 36 additions & 10 deletions

File tree

Dockerfile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ RUN \
2626
yarn && \
2727
apk add --no-cache --virtual=build-dependencies \
2828
build-base \
29-
g++ \
30-
gcc \
3129
icu-dev \
3230
libidn-dev \
3331
libpq-dev \

Dockerfile.aarch64

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@ RUN \
2626
yarn && \
2727
apk add --no-cache --virtual=build-dependencies \
2828
build-base \
29-
g++ \
30-
gcc \
3129
gcompat \
3230
icu-dev \
3331
libidn-dev \

README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,11 +68,17 @@ This image provides various versions that are available via tags. Please read th
6868

6969
## Application Setup
7070

71-
To generate keys for `SECRET_KEY_BASE` & `OTP_SECRET` run `docker run --rm -it -w /app/www --entrypoint rake lscr.io/linuxserver/mastodon secret` once for each.
71+
We provide aliases for the common commands that execute in the correct context so that environment variables from secrets are available to them:
7272

73-
To generate keys for `VAPID_PRIVATE_KEY` & `VAPID_PUBLIC_KEY` run `docker run --rm -it -w /app/www --entrypoint rake lscr.io/linuxserver/mastodon mastodon:webpush:generate_vapid_key`
73+
* To generate keys for `SECRET_KEY_BASE` & `OTP_SECRET` run `docker run --rm -it --entrypoint /bin/bash lscr.io/linuxserver/mastodon generate-secret` once for each.
7474

75-
To use `tootctl` you can run something like `docker exec -it -w /app/www mastodon bin/tootctl <command>`
75+
* To generate keys for `VAPID_PRIVATE_KEY` & `VAPID_PUBLIC_KEY` run `docker run --rm -it --entrypoint /bin/bash lscr.io/linuxserver/mastodon generate-vapid`
76+
77+
Both of the secret generation aliases above can be run without any other setup having been carried out.
78+
79+
* To use `tootctl` you can run something like `docker exec -it lscr.io/linuxserver/mastodon tootctl <command>`
80+
81+
Using `tootctl` requires you to complete the initial Mastodon configuration first.
7682

7783
This container *requires* separate postgres and redis instances to run.
7884

readme-vars.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -76,11 +76,17 @@ param_volumes:
7676
# application setup block
7777
app_setup_block_enabled: true
7878
app_setup_block: |
79-
To generate keys for `SECRET_KEY_BASE` & `OTP_SECRET` run `docker run --rm -it -w /app/www --entrypoint rake lscr.io/linuxserver/mastodon secret` once for each.
79+
We provide aliases for the common commands that execute in the correct context so that environment variables from secrets are available to them:
8080
81-
To generate keys for `VAPID_PRIVATE_KEY` & `VAPID_PUBLIC_KEY` run `docker run --rm -it -w /app/www --entrypoint rake lscr.io/linuxserver/mastodon mastodon:webpush:generate_vapid_key`
81+
* To generate keys for `SECRET_KEY_BASE` & `OTP_SECRET` run `docker run --rm -it --entrypoint /bin/bash lscr.io/linuxserver/mastodon generate-secret` once for each.
8282
83-
To use `tootctl` you can run something like `docker exec -it -w /app/www mastodon bin/tootctl <command>`
83+
* To generate keys for `VAPID_PRIVATE_KEY` & `VAPID_PUBLIC_KEY` run `docker run --rm -it --entrypoint /bin/bash lscr.io/linuxserver/mastodon generate-vapid`
84+
85+
Both of the secret generation aliases above can be run without any other setup having been carried out.
86+
87+
* To use `tootctl` you can run something like `docker exec -it lscr.io/linuxserver/mastodon /tootctl <command>`
88+
89+
Using `tootctl` requires you to complete the initial Mastodon configuration first.
8490
8591
This container *requires* separate postgres and redis instances to run.
8692

root/generate-secret

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/usr/bin/with-contenv bash
2+
# shellcheck shell=bash
3+
4+
cd /app/www || exit 1
5+
6+
rake secret

root/generate-vapid

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/usr/bin/with-contenv bash
2+
# shellcheck shell=bash
3+
4+
cd /app/www || exit 1
5+
6+
rake mastodon:webpush:generate_vapid_key

root/tootctl

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/usr/bin/with-contenv bash
2+
# shellcheck shell=bash
3+
4+
cd /app/www || exit 1
5+
6+
bin/tootctl "$@"

0 commit comments

Comments
 (0)