mirror of
https://github.com/deuill/coreos-home-server.git
synced 2024-09-21 13:40:45 +00:00
gotosocial: Move to Quadlet
This commit is contained in:
parent
43136d090b
commit
2679166819
@ -1,14 +1,12 @@
|
|||||||
FROM docker.io/debian:bullseye-slim
|
FROM docker.io/debian:bookworm-slim
|
||||||
ARG VERSION=0.10.0
|
ARG VERSION=0.10.0
|
||||||
|
|
||||||
RUN apt-get update -y && apt-get upgrade -y && \
|
|
||||||
apt-get install -y --no-install-recommends curl ca-certificates gettext gosu
|
|
||||||
|
|
||||||
ENV PACKAGE_URL https://github.com/superseriousbusiness/gotosocial/releases/download/v${VERSION}/gotosocial_${VERSION}_linux_amd64.tar.gz
|
ENV PACKAGE_URL https://github.com/superseriousbusiness/gotosocial/releases/download/v${VERSION}/gotosocial_${VERSION}_linux_amd64.tar.gz
|
||||||
RUN mkdir -p /opt/gotosocial && curl -L ${PACKAGE_URL} | tar -C /opt/gotosocial --no-same-owner -xvzf - && \
|
RUN apt-get update -y && apt-get upgrade -y && \
|
||||||
mv /opt/gotosocial/gotosocial /bin/gotosocial && chmod +x /bin/gotosocial
|
apt-get install -y --no-install-recommends curl ca-certificates gettext gosu && \
|
||||||
|
mkdir -p /opt/gotosocial && curl -L ${PACKAGE_URL} | tar -C /opt/gotosocial --no-same-owner -xvzf - && \
|
||||||
RUN apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false curl
|
mv /opt/gotosocial/gotosocial /bin/gotosocial && chmod +x /bin/gotosocial && \
|
||||||
|
apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false curl
|
||||||
|
|
||||||
RUN addgroup --system --gid 10000 gotosocial
|
RUN addgroup --system --gid 10000 gotosocial
|
||||||
RUN adduser --system --uid 10000 --ingroup gotosocial --home /var/lib/gotosocial gotosocial
|
RUN adduser --system --uid 10000 --ingroup gotosocial --home /var/lib/gotosocial gotosocial
|
||||||
|
@ -7,7 +7,7 @@ envsubst < /etc/gotosocial/config.yaml.template > /etc/gotosocial/config.yaml
|
|||||||
|
|
||||||
# Create data directories and correct permissions for data files.
|
# Create data directories and correct permissions for data files.
|
||||||
install --owner gotosocial --group gotosocial --mode 700 --directory /var/lib/gotosocial
|
install --owner gotosocial --group gotosocial --mode 700 --directory /var/lib/gotosocial
|
||||||
chown -R gotosocial:gotosocial /etc/gotosocial /var/lib/gotosocial
|
chown -R gotosocial:gotosocial /var/lib/gotosocial
|
||||||
|
|
||||||
# Initialize default condiguration if needed.
|
# Initialize default condiguration if needed.
|
||||||
if ! test -f /var/lib/gotosocial/gotosocial.db; then
|
if ! test -f /var/lib/gotosocial/gotosocial.db; then
|
||||||
|
17
service/gotosocial/quadlet/gotosocial.container
Normal file
17
service/gotosocial/quadlet/gotosocial.container
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
[Unit]
|
||||||
|
Description=GoToSocial ActivityPub Server
|
||||||
|
Wants=container-build@%N.service container-volume@%N.service
|
||||||
|
After=container-build@%N.service container-volume@%N.service
|
||||||
|
|
||||||
|
[Container]
|
||||||
|
ContainerName=%N
|
||||||
|
EnvironmentFile=%E/coreos-home-server/%N/%N.env
|
||||||
|
Image=localhost/%N:latest
|
||||||
|
Network=internal
|
||||||
|
Volume=%N:/var/lib/%N:z
|
||||||
|
|
||||||
|
[Service]
|
||||||
|
Restart=on-failure
|
||||||
|
|
||||||
|
[Install]
|
||||||
|
WantedBy=multi-user.target
|
@ -4,9 +4,5 @@ storage:
|
|||||||
trees:
|
trees:
|
||||||
- path: /etc/coreos-home-server/gotosocial
|
- path: /etc/coreos-home-server/gotosocial
|
||||||
local: service/gotosocial/
|
local: service/gotosocial/
|
||||||
- path: /etc/systemd/system
|
- path: /etc/containers/systemd
|
||||||
local: service/gotosocial/systemd/
|
local: service/gotosocial/quadlet/
|
||||||
systemd:
|
|
||||||
units:
|
|
||||||
- name: gotosocial.service
|
|
||||||
enabled: true
|
|
||||||
|
@ -1,20 +0,0 @@
|
|||||||
[Unit]
|
|
||||||
Description=GoToSocial ActivityPub Server
|
|
||||||
Wants=container-build@%N.service container-volume@%N.service
|
|
||||||
After=container-build@%N.service container-volume@%N.service
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
Type=notify
|
|
||||||
NotifyAccess=all
|
|
||||||
SyslogIdentifier=%N
|
|
||||||
Restart=on-failure
|
|
||||||
Environment=PODMAN_SYSTEMD_UNIT=%n
|
|
||||||
ExecStart=/bin/podman run --replace --name %N --net internal --sdnotify=conmon \
|
|
||||||
--env-file %E/coreos-home-server/%N/%N.env \
|
|
||||||
--volume %N:/var/lib/%N:z \
|
|
||||||
localhost/%N:latest
|
|
||||||
ExecStop=/bin/podman stop --ignore --time 10 %N
|
|
||||||
ExecStopPost=/bin/podman rm --ignore --force %N
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=multi-user.target
|
|
Loading…
Reference in New Issue
Block a user