From 826bcbaee7cc4e6ae581a1a96b12d21b36f3db3f Mon Sep 17 00:00:00 2001 From: svhs Date: Thu, 9 Apr 2026 08:31:10 +0200 Subject: [PATCH] Upload files to "/" --- dex.yaml | 38 +++++++++++++++++++++++++++++++ docker-compose.yml | 54 ++++++++++++++++++++++++++++++++++++++++++++ outline.env | 56 ++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 148 insertions(+) create mode 100644 dex.yaml create mode 100644 docker-compose.yml create mode 100644 outline.env diff --git a/dex.yaml b/dex.yaml new file mode 100644 index 0000000..770b99b --- /dev/null +++ b/dex.yaml @@ -0,0 +1,38 @@ +# Dex OIDC Provider Configuration +# Docs: https://dexidp.io/docs/ + +issuer: http://localhost:5556/dex + +storage: + type: sqlite3 + config: + file: /var/dex/dex.db + +web: + http: 0.0.0.0:5556 + +oauth2: + skipApprovalScreen: true + +staticClients: + - id: outline + redirectURIs: + - "http://localhost:3000/auth/oidc.callback" + name: "Outline" + secret: outline-secret + +enablePasswordDB: true + +# Add your users here +# Generate bcrypt hash: htpasswd -bnBC 10 "" yourpassword | tr -d ':\n' +# The hash below is for the password: "changeme" +staticPasswords: + - email: "admin@example.com" + hash: "$2y$10$O6EAtz/MdPKFuDt5JXqrKOqGJ5sHBMJQAb28P5f2kZlDiQRO6/Fom" + username: "admin" + userID: "08a8684b-db88-4b73-90a9-3cd1661f5466" + + # - email: "user2@example.com" + # hash: "$2y$10$..." + # username: "user2" + # userID: "18b9784b-ec99-5c84-91b0-4cd2772g6m77" diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..5d9beda --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,54 @@ +services: + outline: + image: docker.getoutline.com/outlinewiki/outline:latest + restart: unless-stopped + ports: + - "3000:3000" + volumes: + - outline-storage:/var/lib/outline/data + env_file: ./outline.env + depends_on: + postgres: + condition: service_healthy + redis: + condition: service_healthy + dex: + condition: service_started + + postgres: + image: postgres:16 + restart: unless-stopped + volumes: + - postgres-data:/var/lib/postgresql/data + environment: + POSTGRES_USER: outline + POSTGRES_PASSWORD: outlinepass + POSTGRES_DB: outline + healthcheck: + test: ["CMD", "pg_isready", "-U", "outline"] + interval: 10s + timeout: 5s + retries: 5 + + redis: + image: redis:7 + restart: unless-stopped + healthcheck: + test: ["CMD", "redis-cli", "ping"] + interval: 10s + timeout: 5s + retries: 5 + + dex: + image: dexidp/dex:v2.41.1 + restart: unless-stopped + ports: + - "5556:5556" + volumes: + - ./dex.yaml:/etc/dex/config.yaml + - dex-data:/var/dex + +volumes: + outline-storage: + postgres-data: + dex-data: diff --git a/outline.env b/outline.env new file mode 100644 index 0000000..f407362 --- /dev/null +++ b/outline.env @@ -0,0 +1,56 @@ +# ----------------------------------------------- +# REQUIRED: Change these before starting +# ----------------------------------------------- + +# The public URL where Outline will be accessible +URL=http://localhost:3000 + +# Generate two random secrets, e.g. with: openssl rand -hex 32 +SECRET_KEY=CHANGE_ME_generate_with_openssl_rand_hex_32 +UTILS_SECRET=CHANGE_ME_generate_with_openssl_rand_hex_32 + +# ----------------------------------------------- +# Database & Cache +# ----------------------------------------------- +DATABASE_URL=postgres://outline:outlinepass@postgres:5432/outline +PGSSLMODE=disable +REDIS_URL=redis://redis:6379 + +# ----------------------------------------------- +# File Storage (local disk) +# ----------------------------------------------- +FILE_STORAGE=local +FILE_STORAGE_LOCAL_ROOT_DIR=/var/lib/outline/data +FILE_STORAGE_UPLOAD_MAX_SIZE=262144000 + +# ----------------------------------------------- +# Authentication (Dex OIDC) +# ----------------------------------------------- +OIDC_CLIENT_ID=outline +OIDC_CLIENT_SECRET=outline-secret +OIDC_AUTH_URI=http://localhost:5556/dex/auth +OIDC_TOKEN_URI=http://dex:5556/dex/token +OIDC_USERINFO_URI=http://dex:5556/dex/userinfo +OIDC_USERNAME_CLAIM=preferred_username +OIDC_DISPLAY_NAME=Login +OIDC_SCOPES=openid profile email + +# ----------------------------------------------- +# Optional: SMTP (for magic link emails) +# ----------------------------------------------- +# SMTP_HOST=smtp.example.com +# SMTP_PORT=587 +# SMTP_USERNAME=you@example.com +# SMTP_PASSWORD=yourpassword +# SMTP_FROM_EMAIL=outline@example.com +# SMTP_SECURE=false + +# ----------------------------------------------- +# App settings +# ----------------------------------------------- +NODE_ENV=production +FORCE_HTTPS=false +ENABLE_UPDATES=true +WEB_CONCURRENCY=1 +LOG_LEVEL=info +PORT=3000