From 37410ed362f95736a01ba043c17491380276bd17 Mon Sep 17 00:00:00 2001 From: Travis Herbranson Date: Sun, 10 May 2026 13:10:18 -0400 Subject: [PATCH] init commit to create the project --- .gitignore | 10 ++++++++++ .python-version | 1 + README.md | 0 compose.yml | 41 +++++++++++++++++++++++++++++++++++++++++ configuration.yml | 38 ++++++++++++++++++++++++++++++++++++++ main.py | 6 ++++++ pyproject.toml | 7 +++++++ users_database.yml | 8 ++++++++ uv.lock | 8 ++++++++ 9 files changed, 119 insertions(+) create mode 100644 .gitignore create mode 100644 .python-version create mode 100644 README.md create mode 100644 compose.yml create mode 100644 configuration.yml create mode 100644 main.py create mode 100644 pyproject.toml create mode 100644 users_database.yml create mode 100644 uv.lock diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..505a3b1 --- /dev/null +++ b/.gitignore @@ -0,0 +1,10 @@ +# Python-generated files +__pycache__/ +*.py[oc] +build/ +dist/ +wheels/ +*.egg-info + +# Virtual environments +.venv diff --git a/.python-version b/.python-version new file mode 100644 index 0000000..e4fba21 --- /dev/null +++ b/.python-version @@ -0,0 +1 @@ +3.12 diff --git a/README.md b/README.md new file mode 100644 index 0000000..e69de29 diff --git a/compose.yml b/compose.yml new file mode 100644 index 0000000..a6c3503 --- /dev/null +++ b/compose.yml @@ -0,0 +1,41 @@ +services: + authelia: + image: authelia/authelia:latest + container_name: authelia + restart: unless-stopped + environment: + - AUTHELIA_IDENTITY_VALIDATION_RESET_PASSWORD_JWT_SECRET=0737cb44a0bc366ad0f2b7027aad351feeadc50a8af6bee2a300917bc5963783 + - AUTHELIA_SESSION_SECRET=5c2a6a2d18411b418251dfbeb3fb12751d3d48bbed8a0e5cf296c1870885b212 + - AUTHELIA_STORAGE_ENCRYPTION_KEY=a1f2155ab8b9e5671557253ed05efc7453aaf691d65f3acee2a93a3ac61d3af6 + volumes: + - ./configuration.yml:/config/configuration.yml:ro + - ./users_database.yml:/config/users_database.yml:ro + - authelia_data:/config + networks: + - traefik + labels: + - "traefik.enable=true" + - "traefik.http.routers.authelia.rule=Host(`us-test-authy.taila7f44e.ts.net`) && PathPrefix(`/authelia`)" + - "traefik.http.routers.authelia.entrypoints=https" + - "traefik.http.routers.authelia.tls.certresolver=tailscale" + - "traefik.http.services.authelia.loadbalancer.server.port=9091" + - "traefik.http.middlewares.authelia-auth.forwardAuth.address=http://authelia:9091/authelia/api/authz/forward-auth" + - "traefik.http.middlewares.authelia-auth.forwardAuth.trustForwardHeader=true" + - "traefik.http.middlewares.authelia-auth.forwardAuth.authResponseHeaders=Remote-User,Remote-Groups,Remote-Name,Remote-Email" + + redis: + image: redis:alpine + container_name: authelia-redis + restart: unless-stopped + volumes: + - authelia_redis:/data + networks: + - traefik + +volumes: + authelia_data: + authelia_redis: + +networks: + traefik: + external: true diff --git a/configuration.yml b/configuration.yml new file mode 100644 index 0000000..cb4122a --- /dev/null +++ b/configuration.yml @@ -0,0 +1,38 @@ +theme: dark + +server: + address: 'tcp://0.0.0.0:9091/authelia' + +log: + level: info + +totp: + issuer: us-test-authy.taila7f44e.ts.net + +authentication_backend: + file: + path: /config/users_database.yml + +access_control: + default_policy: one_factor + rules: + - domain: us-test-authy.taila7f44e.ts.net + policy: one_factor + +session: + cookies: + - domain: 'us-test-authy.taila7f44e.ts.net' + authelia_url: 'https://us-test-authy.taila7f44e.ts.net/authelia/' + default_redirection_url: 'https://us-test-authy.taila7f44e.ts.net' + + redis: + host: authelia-redis + port: 6379 + +storage: + local: + path: /config/db.sqlite3 + +notifier: + filesystem: + filename: /config/notification.txt diff --git a/main.py b/main.py new file mode 100644 index 0000000..4f62f21 --- /dev/null +++ b/main.py @@ -0,0 +1,6 @@ +def main(): + print("Hello from authelia!") + + +if __name__ == "__main__": + main() diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 0000000..5753a3e --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,7 @@ +[project] +name = "authelia" +version = "0.1.0" +description = "Add your description here" +readme = "README.md" +requires-python = ">=3.12" +dependencies = [] diff --git a/users_database.yml b/users_database.yml new file mode 100644 index 0000000..79c0779 --- /dev/null +++ b/users_database.yml @@ -0,0 +1,8 @@ +users: + herby12358: + disabled: false + displayname: "Herby" + password: "$argon2id$v=19$m=65536,t=3,p=4$8QSd6CWlgwDLTMlXQ1z0Pg$v+avmLCIj6WwZvu8mPVA2ImccQcqiljnHU7d3kxrTtE" + email: tjherbranson@gmail.com + groups: + - admins diff --git a/uv.lock b/uv.lock new file mode 100644 index 0000000..9e405b0 --- /dev/null +++ b/uv.lock @@ -0,0 +1,8 @@ +version = 1 +revision = 3 +requires-python = ">=3.12" + +[[package]] +name = "authelia" +version = "0.1.0" +source = { virtual = "." }