Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions .daemonless/compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: authelia-test

services:
authelia-server:
image: ghcr.io/daemonless/authelia-server:build
network_mode: host
restart: unless-stopped

environment:
PUID: 1000
PGID: 1000
TZ: UTC
CIT_RUN: true

volumes:
- config:/config

ports:
- 9099:9099

depends_on:
- redis

redis:
image: ghcr.io/daemonless/redis:latest
network_mode: host
restart: unless-stopped
volumes:
- /etc/localtime:/etc/localtime:ro
- redis:/config

volumes:
config:
redis:
5 changes: 4 additions & 1 deletion .daemonless/config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
icon: ':simple-authelia:'
cit:
mode: shell
compose: true
mode: health
port: 9099
health: /api/health
build:
pkg_name: authelia
auto_version: true
Expand Down
14 changes: 3 additions & 11 deletions Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ ARG FREEBSD_ARCH=amd64
ARG PACKAGES=""
ARG UPSTREAM_URL="https://api.github.com/repos/authelia/authelia/releases/latest"
ARG UPSTREAM_JQ=".tag_name"
ARG HEALTHCHECK_ENDPOINT="http://localhost:3000"
ARG HEALTHCHECK_ENDPOINT="http://localhost:9091/api/health"

LABEL org.opencontainers.image.title="Authelia" \
org.opencontainers.image.description="Authelia on FreeBSD." \
Expand All @@ -27,15 +27,7 @@ LABEL org.opencontainers.image.title="Authelia" \
io.daemonless.upstream-repo=authelia/authelia \
io.daemonless.upstream-url="${UPSTREAM_URL}" \
io.daemonless.upstream-jq="${UPSTREAM_JQ}" \
io.daemonless.healthcheck-url="${HEALTHCHECK_ENDPOINT}" \
io.daemonless.wip="true"


# Install dependencies
#RUN pkg update && \
# pkg install -y ${PACKAGES} && \
# pkg clean -ay && \
# rm -rf /var/cache/pkg/* /var/db/pkg/repos/*
io.daemonless.healthcheck-url="${HEALTHCHECK_ENDPOINT}"

# Download and install authelia
RUN APP_VERSION=$(fetch -qo - "${UPSTREAM_URL}" | \
Expand All @@ -58,4 +50,4 @@ RUN chmod +x /etc/services.d/*/run /etc/cont-init.d/* /healthz 2>/dev/null || tr
EXPOSE 9091

# --- Volumes (Injected by Generator) ---
VOLUME /config /data
VOLUME /config
12 changes: 2 additions & 10 deletions Containerfile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ ARG FREEBSD_ARCH=amd64
ARG PACKAGES=""
ARG UPSTREAM_URL="https://api.github.com/repos/authelia/authelia/releases/latest"
ARG UPSTREAM_JQ=".tag_name"
ARG HEALTHCHECK_ENDPOINT="http://localhost:3000"
ARG HEALTHCHECK_ENDPOINT="http://localhost:9091/api/health"

LABEL org.opencontainers.image.title="{{ title }}" \
org.opencontainers.image.description="{{ description }}" \
Expand All @@ -23,15 +23,7 @@ LABEL org.opencontainers.image.title="{{ title }}" \
io.daemonless.upstream-repo=authelia/authelia \
io.daemonless.upstream-url="${UPSTREAM_URL}" \
io.daemonless.upstream-jq="${UPSTREAM_JQ}" \
io.daemonless.healthcheck-url="${HEALTHCHECK_ENDPOINT}" \
io.daemonless.wip="true"


# Install dependencies
#RUN pkg update && \
# pkg install -y ${PACKAGES} && \
# pkg clean -ay && \
# rm -rf /var/cache/pkg/* /var/db/pkg/repos/*
io.daemonless.healthcheck-url="${HEALTHCHECK_ENDPOINT}"

# Download and install authelia
RUN APP_VERSION=$(fetch -qo - "${UPSTREAM_URL}" | \
Expand Down
16 changes: 3 additions & 13 deletions Containerfile.pkg
Original file line number Diff line number Diff line change
Expand Up @@ -21,25 +21,15 @@ LABEL org.opencontainers.image.title="Authelia" \
io.daemonless.category="Utilities" \
io.daemonless.port="9091" \
io.daemonless.arch="${FREEBSD_ARCH}" \
io.daemonless.packages="${PACKAGES}" \
io.daemonless.wip="true"

io.daemonless.packages="${PACKAGES}"

# Install from FreeBSD packages
RUN pkg update && pkg install -y ${PACKAGES} && \
pkg clean -ay && rm -rf /var/cache/pkg/* /var/db/pkg/repos/*

# Install dependencies
RUN pkg update && \
pkg install -y ${PACKAGES} && \
pkg clean -ay && \
mkdir -p /app && pkg info authelia | sed -n 's/.*Version.*: *//p' > /app/version && \
pkg clean -ay && \
rm -rf /var/cache/pkg/* /var/db/pkg/repos/*

# Extract version
RUN mkdir -p /app && \
pkg info authelia | sed -n 's/.*Version.*: *//p' > /app/version

# Copy root filesystem and set permissions
COPY root/ /
RUN if [ -f /etc/services.d/authelia/run.pkg ]; then \
Expand All @@ -52,4 +42,4 @@ RUN if [ -f /etc/services.d/authelia/run.pkg ]; then \
EXPOSE 9091

# --- Volumes (Injected by Generator) ---
VOLUME /config /data
VOLUME /config
14 changes: 2 additions & 12 deletions Containerfile.pkg.j2
Original file line number Diff line number Diff line change
Expand Up @@ -15,25 +15,15 @@ LABEL org.opencontainers.image.title="Authelia" \
io.daemonless.category="Utilities" \
io.daemonless.port="9091" \
io.daemonless.arch="${FREEBSD_ARCH}" \
io.daemonless.packages="${PACKAGES}" \
io.daemonless.wip="true"

io.daemonless.packages="${PACKAGES}"

# Install from FreeBSD packages
RUN pkg update && pkg install -y ${PACKAGES} && \
pkg clean -ay && rm -rf /var/cache/pkg/* /var/db/pkg/repos/*

# Install dependencies
RUN pkg update && \
pkg install -y ${PACKAGES} && \
pkg clean -ay && \
mkdir -p /app && pkg info authelia | sed -n 's/.*Version.*: *//p' > /app/version && \
pkg clean -ay && \
rm -rf /var/cache/pkg/* /var/db/pkg/repos/*

# Extract version
RUN mkdir -p /app && \
pkg info authelia | sed -n 's/.*Version.*: *//p' > /app/version

# Copy root filesystem and set permissions
COPY root/ /
RUN if [ -f /etc/services.d/authelia/run.pkg ]; then \
Expand Down
6 changes: 0 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ services:
- TZ=UTC
volumes:
- "/path/to/containers/authelia-server:/config"
- "/path/to/containers/authelia-server/data:/data"
ports:
- 9091:9091
restart: unless-stopped
Expand All @@ -63,7 +62,6 @@ podman run -d --name authelia-server \
-e PGID=1000 \
-e TZ=UTC \
-v /path/to/containers/authelia-server:/config \
-v /path/to/containers/authelia-server/data:/data \
ghcr.io/daemonless/authelia-server:latest
```

Expand All @@ -84,7 +82,6 @@ podman run -d --name authelia-server \
- "9091:9091"
volumes:
- "/path/to/containers/authelia-server:/config"
- "/path/to/containers/authelia-server/data:/data"
```


Expand All @@ -103,16 +100,13 @@ podman run -d --name authelia-server \
| Path | Description |
|------|-------------|
| `/config` | Configuration directory |
| `/data` | data directory |

### Ports

| Port | Protocol | Description |
|------|----------|-------------|
| `9091` | TCP | Web UI |

This image is part of the [Authelia Stack](https://daemonless.io/images/authelia).

**Architectures:** amd64
**User:** `bsd` (UID/GID via PUID/PGID, defaults to 1000:1000)
**Base:** FreeBSD 15.0
Expand Down
21 changes: 14 additions & 7 deletions compose.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: authelia-server
name: authelia

x-daemonless:
title: "Authelia"
Expand All @@ -11,7 +11,6 @@ x-daemonless:
user: "bsd"
mlock: false
community: "Discord:https://discord.gg/Kb9tkhecZT"
notes: "This image is part of the [Authelia Stack](https://daemonless.io/images/authelia)."

docs:
env:
Expand All @@ -20,7 +19,6 @@ x-daemonless:
TZ: "Timezone for the container"
volumes:
/config: "Configuration directory"
/data: "data directory"
ports:
9091: "Web UI"

Expand All @@ -29,15 +27,24 @@ services:
image: ghcr.io/daemonless/authelia-server:latest
container_name: authelia-server
restart: unless-stopped

environment:
- PUID=1000
- PGID=1000
- TZ=UTC

volumes:
- /path/to/containers/authelia/config:/config
- /path/to/containers/authelia/data:/data

ports:
- 9091:9091
depends_on:
- redis

redis:
container_name: authelia_redis
image: ghcr.io/daemonless/redis:latest
restart: unless-stopped
volumes:
- /etc/localtime:/etc/localtime:ro
- redis:/config

volumes:
redis:
42 changes: 42 additions & 0 deletions root/etc/cont-init.d/30-test-init
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#!/bin/sh
echo "Initializing config for test"
if [ "x${CIT_RUN}" == "x" ]; then
# If we are not running as a cit test, exit and do not overwrite the config
exit 0
fi

echo "Writing config for test"
# Write a minimal config for testing app startup
cat << EOF > /config/authelia.yml
---
server:
address: 'tcp://:9099/'
identity_validation:
reset_password:
jwt_secret: 'a_very_important_secret'
authentication_backend:
file:
path: '/config/users_database.yml'
access_control:
default_policy: 'one_factor'
session:
secret: 'insecure_session_secret'
cookies:
-
name: 'authelia_session'
domain: 'example.com'
authelia_url: 'https://auth.example.com'
redis:
host: '127.0.0.1'
port: 6379
storage:
encryption_key: 'you_must_generate_a_random_string_of_more_than_twenty_chars_and_configure_this'
local:
path: '/config/db.sqlite3'
notifier:
filesystem:
filename: '/config/notification.txt'
...
EOF

chown bsd:bsd /config/authelia.yml