diff --git a/apps/outline/config.json b/apps/outline/config.json new file mode 100644 index 00000000..f51604a0 --- /dev/null +++ b/apps/outline/config.json @@ -0,0 +1,75 @@ +{ + "name": "Outline", + "id": "outline", + "available": true, + "short_desc": "A home for all your docs", + "author": "outline", + "port": 8404, + "categories": [ + "utilities" + ], + "description": "Outline is a knowledge base designed for teams. It's goals are to be fast, intuitive and support many integrations.", + "tipi_version": 1, + "version": "0.75.2", + "source": "https://github.com/outline/outline", + "website": "https://getoutline.com", + "exposable": true, + "force_expose": true, + "form_fields": [ + { + "type": "random", + "label": "Outline secret key", + "min": 64, + "env_variable": "OUTLINE_SECRET_KEY" + }, + { + "type": "random", + "label": "Outline utils secret", + "min": 32, + "env_variable": "OUTLINE_UTILS_SECRET" + }, + { + "type": "random", + "label": "OIDC client ID", + "min": 32, + "env_variable": "OUTLINE_OIDC_CLID" + }, + { + "type": "random", + "label": "OIDC client secret", + "min": 32, + "env_variable": "OUTLINE_OIDC_CLKEY" + }, + { + "type": "random", + "label": "Database password", + "min": 32, + "env_variable": "OUTLINE_PG_PASSWORD" + }, + { + "type": "random", + "label": "OIDC secret", + "min": 32, + "env_variable": "OUTLINE_OIDC_SECRET" + }, + { + "type": "text", + "label": "Username", + "max": 50, + "min": 3, + "required": true, + "env_variable": "OUTLINE_USER" + }, + { + "type": "password", + "label": "Password", + "min": 12, + "required": true, + "env_variable": "OUTLINE_PASSWORD" + } + ], + "supported_architectures": [ + "arm64", + "amd64" + ] +} \ No newline at end of file diff --git a/apps/outline/data/nginx/default.conf b/apps/outline/data/nginx/default.conf new file mode 100644 index 00000000..f8d5a324 --- /dev/null +++ b/apps/outline/data/nginx/default.conf @@ -0,0 +1,31 @@ +server { + listen 80; + client_max_body_size 100m; + + # Outline Wiki + location / { + proxy_pass http://outline:3000; + + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection "Upgrade"; + proxy_set_header Host $host; + + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header Host $http_host; + proxy_set_header X-Real-IP $remote_addr; + proxy_set_header X-Scheme $scheme; + proxy_set_header X-Forwarded-Proto $scheme; + proxy_redirect off; + } + + # Static file FOR OIDC Server + location /uc/static { + alias /uc/static_root; + } + + # OIDC Server + location /uc { + proxy_set_header SCRIPT_NAME /uc; + proxy_pass http://outline-oidc:8000; + } +} diff --git a/apps/outline/data/oidc-config.json.template b/apps/outline/data/oidc-config.json.template new file mode 100644 index 00000000..acc5d72c --- /dev/null +++ b/apps/outline/data/oidc-config.json.template @@ -0,0 +1,32 @@ +[ + { + "model": "oidc_provider.client", + "pk": 1, + "fields": { + "name": "outline", + "owner": null, + "client_type": "confidential", + "client_id": "{{OUTLINE_OIDC_CLID}}", + "client_secret": "{{OUTLINE_OIDC_CLKEY}}", + "jwt_alg": "RS256", + "date_created": "2024-03-02", + "website_url": "", + "terms_url": "", + "contact_email": "", + "logo": "", + "reuse_consent": true, + "require_consent": true, + "_redirect_uris": "https://{{APP_DOMAIN}}/auth/oidc.callback", + "_post_logout_redirect_uris": "", + "_scope": "", + "response_types": [ + 1, + 2, + 3, + 4, + 5, + 6 + ] + } + } +] \ No newline at end of file diff --git a/apps/outline/docker-compose.yml b/apps/outline/docker-compose.yml new file mode 100644 index 00000000..9f9379dd --- /dev/null +++ b/apps/outline/docker-compose.yml @@ -0,0 +1,97 @@ +version: "3.8" + +services: + outline: + container_name: outline + image: docker.getoutline.com/outlinewiki/outline:0.75.2 + restart: unless-stopped + environment: + - DATABASE_URL=postgres://outline:${OUTLINE_PG_PASSWORD}@outline-postgres:5432/outline + - REDIS_URL=redis://outline-redis:6379 + - SECRET_KEY=${OUTLINE_SECRET_KEY} + - UTILS_SECRET=${OUTLINE_UTILS_SECRET} + - URL=https://${APP_DOMAIN} + - FORCE_HTTPS=false + - FILE_STORAGE=local + - FILE_STORAGE_UPLOAD_MAX_SIZE=26214400 + - PGSSLMODE=disable + - OIDC_CLIENT_ID=${OUTLINE_OIDC_CLID} + - OIDC_CLIENT_SECRET=${OUTLINE_OIDC_CLKEY} + - OIDC_AUTH_URI=https://${APP_DOMAIN}/uc/oauth/authorize/ + - OIDC_TOKEN_URI=http://outline-oidc:8000/oauth/token/ + - OIDC_USERINFO_URI=http://outline-oidc:8000/oauth/userinfo/ + - OIDC_USERNAME_CLAIM=preferred_username + - OIDC_DISPLAY_NAME=OpenID + - OIDC_SCOPES=openid profile email + volumes: + - ${APP_DATA_DIR}/data/outline:/var/lib/outline/data + depends_on: + - outline-postgres + - outline-redis + networks: + - tipi_main_network + + outline-postgres: + container_name: outline-postgres + image: postgres:16-alpine + restart: unless-stopped + environment: + - POSTGRES_USER=outline + - POSTGRES_PASSWORD=${OUTLINE_PG_PASSWORD} + - POSTGRES_DB=outline + volumes: + - ${APP_DATA_DIR}/data/db:/var/lib/postgresql/data + networks: + - tipi_main_network + + outline-redis: + container_name: outline-redis + image: redis:7-alpine + restart: unless-stopped + networks: + - tipi_main_network + + outline-oidc: + container_name: outline-oidc + image: ghcr.io/hex-developer/oidc-provider:v0.2.0 + restart: unless-stopped + environment: + - LANGUAGE_CODE=en-us + - TIME_ZONE=UTC + - FORCE_SCRIPT_NAME=/uc + - SECRET_KEY=${OUTLINE_OIDC_SECRET} + - DJANGO_SUPERUSER_PASSWORD=${OUTLINE_PASSWORD} + - DJANGO_SUPERUSER_USERNAME=${OUTLINE_USER} + - DJANGO_SUPERUSER_EMAIL=user@outline.localhost + - INITIAL_DATA=oidc-config.json + - DOMAIN=https://${APP_DOMAIN} + volumes: + - ${APP_DATA_DIR}/data/oidc-config.json:/app/oidc-config.json:ro + - ${APP_DATA_DIR}/data/uc/db:/app/db:z + - ${APP_DATA_DIR}/data/uc/static_root:/app/static_root:z + networks: + - tipi_main_network + + outline-nginx: + container_name: outline-reverse-proxy + image: nginx:alpine + restart: unless-stopped + ports: + - ${APP_PORT}:80 + volumes: + - ${APP_DATA_DIR}/data/nginx/:/etc/nginx/conf.d/:ro + - ${APP_DATA_DIR}/data/uc/static_root:/uc/static_root:ro + depends_on: + - outline + - outline-oidc + networks: + - tipi_main_network + labels: + # Main + traefik.enable: true + traefik.http.middlewares.outline-web-redirect.redirectscheme.scheme: https + traefik.http.services.outline.loadbalancer.server.port: 80 + traefik.http.routers.outline.rule: Host(`${APP_DOMAIN}`) + traefik.http.routers.outline.entrypoints: websecure + traefik.http.routers.outline.service: outline + traefik.http.routers.outline.tls.certresolver: myresolver \ No newline at end of file diff --git a/apps/outline/metadata/description.md b/apps/outline/metadata/description.md new file mode 100644 index 00000000..fae95f57 --- /dev/null +++ b/apps/outline/metadata/description.md @@ -0,0 +1,13 @@ +## Outline +_A fast, collaborative, knowledge base for your team built using React and Node.js._ +screenshot + +Outline is a full-featured knowledge base and is a great alternative to Notion, Obsidian and other similar apps. +### Features +- Easily host your documents +- Modern UI +- API & Integration support +- Multiple components to choose from when editing documents +- Markdown syntax + +Learn more at the official [website](https://getoutline.com) \ No newline at end of file diff --git a/apps/outline/metadata/logo.jpg b/apps/outline/metadata/logo.jpg new file mode 100644 index 00000000..ea393815 Binary files /dev/null and b/apps/outline/metadata/logo.jpg differ