Skip to content

Commit 818732b

Browse files
authored
Merge pull request #32 from linuxserver/aliases-develop
2 parents a06c09f + f72497f commit 818732b

7 files changed

Lines changed: 38 additions & 10 deletions

File tree

Dockerfile

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

Dockerfile.aarch64

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

README.md

Lines changed: 10 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 bin/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

@@ -351,6 +357,7 @@ Once registered you can define the dockerfile to use with `-f Dockerfile.aarch64
351357

352358
## Versions
353359

360+
* **26.01.23:** - Add aliases for key generation & tootctl to better support secrets.
354361
* **19.12.22:** - Support separate sidekiq queue instances.
355362
* **08.11.22:** - Add develop branch.
356363
* **05.11.22:** - Initial Release.

readme-vars.yml

Lines changed: 10 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
@@ -100,6 +106,7 @@ app_setup_block: |
100106
101107
# changelog
102108
changelogs:
109+
- { date: "26.01.23:", desc: "Add aliases for key generation & tootctl to better support secrets." }
103110
- { date: "19.12.22:", desc: "Support separate sidekiq queue instances." }
104111
- { date: "08.11.22:", desc: "Add develop branch." }
105112
- { date: "05.11.22:", desc: "Initial Release." }

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)