add quadlet files
Some checks are pending
ci/woodpecker/push/build-amd64 Pipeline is pending
ci/woodpecker/push/build-arm64 Pipeline is pending
ci/woodpecker/push/docs Pipeline is pending
ci/woodpecker/push/lint Pipeline is pending
ci/woodpecker/push/test Pipeline is pending

This commit is contained in:
Floatingghost 2023-12-31 17:57:19 +00:00
parent 167d936d53
commit 4685abc894
5 changed files with 83 additions and 0 deletions

View file

@ -44,6 +44,11 @@ RUN apk add ffmpeg imagemagick exiftool ncurses postgresql-client file-dev libma
COPY --from=BUILD /release /opt/akkoma/
ADD ./docker-entrypoint.sh /opt/akkoma/
EXPOSE 4000
VOLUME /opt/akkoma/uploads/
VOLUME /opt/akkoma/instance/
VOLUME /opt/akkoma/config/docker-config.exs
WORKDIR /opt/akkoma
CMD [ "/opt/akkoma/docker-entrypoint.sh" ]

View file

@ -0,0 +1,23 @@
# Put me at either:
# /usr/share/containers/systemd/akkoma-postgresql.container
# /etc/containers/systemd/akkoma-postgresql.container
# $HOME/.config/containers/systemd/akkoma-postgresql.container (for rootless podman!)
[Unit]
Description=Akkoma's postgres database
After=local-fs.target
[Container]
Image=docker.io/postgres:14
PublishPort=4000
Volume=/opt/akkoma/pgdata:/var/lib/postgresql/data:Z
AutoUpdate=registry
Environment=POSTGRES_DB=akkoma
Environment=POSTGRES_USER=akkoma
Environment=POSTGRES_PASSWORD=akkoma
ContainerName=db
Network=systemd-akkoma
[Install]
# Start by default on boot
WantedBy=multi-user.target default.target

View file

@ -0,0 +1,26 @@
# Put me at either:
# /usr/share/containers/systemd/akkoma.container
# /etc/containers/systemd/akkoma.container
# $HOME/.config/containers/systemd/akkoma.container (Recommended, for rootless podman!)
[Unit]
Description=The main Akkoma container
After=local-fs.target akkoma-postgresql.container
[Container]
Image=akkoma:latest
ExposeHostPort=4000
# Comment the next line if you intend to use containerized caddy!
PublishPort=4000:4000
Volume=/opt/akkoma/uploads:/opt/akkoma/uploads:Z
Volume=/opt/akkoma/instance:/opt/akkoma/instance:Z
Volume=/opt/akkoma/config.exs:/opt/akkoma/config/config.exs:Z
#AutoUpdate=registry
NoNewPrivileges=true
Environment=AKKOMA_CONFIG_PATH=/opt/akkoma/config/config.exs
ContainerName=akkoma
Network=systemd-akkoma
[Install]
# Start by default on boot
WantedBy=multi-user.target default.target

View file

@ -0,0 +1,2 @@
[Network]
Label=app=akkoma

View file

@ -0,0 +1,27 @@
# Put me at either:
# /usr/share/containers/systemd/caddy.container
# /etc/containers/systemd/caddy.container
# !!!! PLEASE NOTE !!!!
# Caddy cannot run containerised in rootless podman, since it wants access
# to privileged ports 80 and 443!
# run caddy on your host if you're rootless!
[Unit]
Description=Akkoma's postgres database
After=local-fs.target
[Container]
Image=docker.io/caddy:2-alpine
PublishPort=80:80
PublishPort=443:443
ExposeHostPort=80
ExposeHostPort=443
Volume=/opt/akkoma/Caddyfile:/etc/caddy/Caddyfile
Volume=/opt/akkoma/caddy-data:/data
Volume=/opt/akkoma/caddy-config:/config
AutoUpdate=registry
Network=systemd-akkoma
[Install]
# Start by default on boot
WantedBy=multi-user.target default.target