Giter Site home page Giter Site logo

soulteary / docker-outline Goto Github PK

View Code? Open in Web Editor NEW
145.0 4.0 23.0 26 KB

A simple 🧑‍💻 and reliable self-hosted plan for Outline.

Home Page: https://github.com/soulteary/docker-sso-server

License: Creative Commons Zero v1.0 Universal

Shell 71.67% Dockerfile 28.33%

docker-outline's Introduction

README

This project is mainly used to demonstrate how to use privatized deployment (Self-Hosted).

You can replace .env with a new version number to complete an unsense upgrade of the application.

中文用户可以阅读下面的配置教程

Project Dependency

  • Traefik: traefik:v2.5
    • Used as a service gateway for various applications, providing service discovery, domain name binding and other functions.
  • Outline Server: outlinewiki/outline:0.60.3
    • Outline application.
  • S3 Server: minio/minio:RELEASE.2021-09-03T03-56-13Z
    • Provide object storage capabilities.
  • S3 Client: minio/mc:RELEASE.2021-09-02T09-21-27Z
    • Initialize the bucket required by the application
  • SSO Server: soulteary/sso-server:1.1.5
    • Make it possible for the outline to log in locally.
  • Database: postgres:13.3
    • Store all document related data.
  • Redis: redis:6.2.4
    • Cache service to make your application run faster.
  • Attachment: andreimarcu/linx-server:version-2.3.8
    • Outline currently does not support attachments, this small tool can be used as a supplement.

Usage

  1. Make a copy of the default configuration .env.example and save the file name as .env. Modify the content in according to your needs, such as domain name, various "user names" and "passwords".
cp .env.example .env
  1. According to your actual situation, create a virtual network card to provide in-container and external services.
docker network create traefik
docker network create outline
  1. Use docker-compose to start the service. Wait for the status of all services to become healthy.
docker-compose -f docker-compose.postgres.yml -f docker-compose.redis.yml -f docker-compose.minio.yml -f docker-compose.attachment.yml -f docker-compose.sso.yml -f docker-compose.outline.yml up -d
Creating outline_minio    ... done
Creating outline-postgres ... done
Creating outline-redis    ... done
Creating linx-server      ... done
Creating outline          ... done
Creating sso-server       ... done
  1. Use docker-compose to check if the service is ready.
docker-compose -f docker-compose.postgres.yml -f docker-compose.redis.yml -f docker-compose.minio.yml -f docker-compose.attachment.yml -f docker-compose.sso.yml -f docker-compose.outline.yml ps   
      Name                    Command                  State        Ports  
---------------------------------------------------------------------------
linx-server        /usr/local/bin/linx-server ...   Up (healthy)   8080/tcp
outline            docker-entrypoint.sh sh -c ...   Up (healthy)   3000/tcp
outline-postgres   docker-entrypoint.sh postgres    Up (healthy)   5432/tcp
outline-redis      docker-entrypoint.sh redis ...   Up (healthy)   6379/tcp
outline_minio      /usr/bin/docker-entrypoint ...   Up (healthy)   9000/tcp
sso-server         docker-entrypoint.sh ./main      Up (healthy)   80/tcp   
  1. Create the bucket storage space required for the application

It only needs to be executed when the application is first initialized.

docker-compose -f docker-compose.minio-init.yml up 
Recreating outline_minio_client ... done
Attaching to docker-outline_minio-client_1
minio-client_1  | Removed `local` successfully.
minio-client_1  | Added `local` successfully.
minio-client_1  | Bucket created successfully `local/outline/`.
minio-client_1  | Access permission for `local/outline` is set to `public`
docker-outline_minio-client_1 exited with code 0
  1. Open the browser and enjoy.

docker-outline's People

Contributors

soulteary avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

docker-outline's Issues

MacOS Chrome 无法上传图片

Google Chrome | 105.0.5195.125 (正式版本) (arm64)
-- | --
修订版本 | 1e8949033cc650c8496b3b0af7cd54372f7ff62b-refs/branch-heads/5195@{#1107}
操作系统 | macOS 版本11.3.1(版号20E241)

Safari 和 firefox 可以上传,但 Chrome 无法上传图片

SequelizeDatabaseError: column team.slackId does not exist

I get db error before my first login.
please help!!

  SequelizeDatabaseError: column team.slackId does not exist
      at Query.formatError (/opt/outline/node_modules/sequelize/lib/dialects/postgres/query.js:392:16)
      at Query.run (/opt/outline/node_modules/sequelize/lib/dialects/postgres/query.js:87:18)
      at processTicksAndRejections (internal/process/task_queues.js:95:5)
      at async /opt/outline/node_modules/sequelize/lib/sequelize.js:619:16
      at async PostgresQueryInterface.select (/opt/outline/node_modules/sequelize/lib/dialects/abstract/query-interface.js:953:12)
      at async Function.findAll (/opt/outline/node_modules/sequelize/lib/model.js:1752:21)
      at async /opt/outline/build/server/routes/api/auth.js:52:19
      at async apiWrapperMiddleware (/opt/outline/build/server/routes/api/middlewares/apiWrapper.js:14:5)
      at async errorHandlingMiddleware (/opt/outline/build/server/middlewares/errorHandling.js:17:7)
      at async /opt/outline/node_modules/koa-mount/index.js:58:5
      at async /opt/outline/node_modules/koa-mount/index.js:52:26
      at async logger (/opt/outline/node_modules/koa-logger/index.js:67:7)

DatabaseError [SequelizeDatabaseError]: column team.slackId does not exist
    at Query.formatError (/opt/outline/node_modules/sequelize/lib/dialects/postgres/query.js:392:16)
    at Query.run (/opt/outline/node_modules/sequelize/lib/dialects/postgres/query.js:87:18)
    at processTicksAndRejections (internal/process/task_queues.js:95:5)
    at async /opt/outline/node_modules/sequelize/lib/sequelize.js:619:16
    at async PostgresQueryInterface.select (/opt/outline/node_modules/sequelize/lib/dialects/abstract/query-interface.js:953:12)
    at async Function.findAll (/opt/outline/node_modules/sequelize/lib/model.js:1752:21)
    at async /opt/outline/build/server/routes/api/auth.js:52:19
    at async apiWrapperMiddleware (/opt/outline/build/server/routes/api/middlewares/apiWrapper.js:14:5)
    at async errorHandlingMiddleware (/opt/outline/build/server/middlewares/errorHandling.js:17:7)
    at async /opt/outline/node_modules/koa-mount/index.js:58:5
    at async /opt/outline/node_modules/koa-mount/index.js:52:26
    at async logger (/opt/outline/node_modules/koa-logger/index.js:67:7) {
  parent: error: column team.slackId does not exist
      at Parser.parseErrorMessage (/opt/outline/node_modules/pg-protocol/dist/parser.js:278:15)
      at Parser.handlePacket (/opt/outline/node_modules/pg-protocol/dist/parser.js:126:29)
      at Parser.parse (/opt/outline/node_modules/pg-protocol/dist/parser.js:39:38)
      at Socket.<anonymous> (/opt/outline/node_modules/pg-protocol/dist/index.js:10:42)
      at Socket.emit (events.js:400:28)
      at Socket.emit (domain.js:475:12)
      at addChunk (internal/streams/readable.js:293:12)
      at readableAddChunk (internal/streams/readable.js:267:9)
      at Socket.Readable.push (internal/streams/readable.js:206:10)
      at TCP.onStreamRead (internal/stream_base_commons.js:188:23) {
    length: 110,
    severity: 'ERROR',
    code: '42703',
    detail: undefined,
    hint: undefined,
    position: '73',
    internalPosition: undefined,
    internalQuery: undefined,
    where: undefined,
    schema: undefined,
    table: undefined,
    column: undefined,
    dataType: undefined,
    constraint: undefined,
    file: 'parse_relation.c',
    line: '3514',
    routine: 'errorMissingColumn',
    sql: 'SELECT "team"."id", "team"."name", "team"."subdomain", "team"."domain", "team"."slackId", "team"."googleId", "team"."avatarUrl", "team"."sharing", "team"."signupQueryParams", "team"."guestSignin", "team"."documentEmbeds", "team"."collaborativeEditing", "team"."defaultUserRole", "team"."createdAt", "team"."updatedAt", "team"."deletedAt", "authenticationProviders"."id" AS "authenticationProviders.id", "authenticationProviders"."name" AS "authenticationProviders.name", "authenticationProviders"."enabled" AS "authenticationProviders.enabled", "authenticationProviders"."providerId" AS "authenticationProviders.providerId", "authenticationProviders"."createdAt" AS "authenticationProviders.createdAt", "authenticationProviders"."teamId" AS "authenticationProviders.teamId" FROM "teams" AS "team" LEFT OUTER JOIN "authentication_providers" AS "authenticationProviders" ON "team"."id" = "authenticationProviders"."teamId" WHERE ("team"."deletedAt" IS NULL);',
    parameters: undefined
  },

err.log

安装时报错

[+] Running 4/6
⠿ Container linx-server Started 1.0s
⠿ Container outline-postgres Starting 1.3s
⠿ Container sso-server Started 1.2s
⠿ Container outline Started 1.3s
⠿ Container outline_minio Started 1.3s
⠿ Container outline-redis Starting 1.3s
Error response from daemon: OCI runtime create failed: container_linux.go:380: starting container process caused: process_linux.go:545: container init caused: rootfs_linux.go:76: mounting "/etc/timezone" to rootfs at "/etc/timezone" caused: mount through procfd: not a directory: unknown: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type

图片上传有问题

这是从 minio 后台上传的图片,可以正常上传,但是在
image

image

但是在outline 上传图片时,还是报错,已经执行了 docker-compose.minio-init.yml 文件,
我这里怀疑是docker 权限问题,没有权限去上传
附件这里也是提示 permission denied。
Could not upload file: open /data/files/gp5r4u8g.jpeg: permission denied
image

Docker compose version messy error.

environment

  • Linux Server 5.4.0-125-generic Ubuntu GNU/Linux
  • Docker version 20.10.12, build 20.10.12-0ubuntu2~20.04.1
  • docker-compose version 1.25.0

what is the problem

I get this when I use the following command.

root@server:# docker-compose -f docker-compose.postgres.yml -f docker-compose.redis.yml -f docker-compose.minio.yml -f docker-compose.attachment.yml -f docker-compose.sso.yml -f docker-compose.outline.yml up -d

ERROR: Version mismatch: file ./docker-compose.postgres.yml specifies version 3.0 but extension file ./docker-compose.sso.yml uses version 3.6

simple solution

I changed the version: "3.6" under the docker-compose.sso.yml file to version: "3" and solved the problem.

I am not sure if I am the only one having this problem.

That's why I opened issues.

[Question] About disabling magic sign-in links

Hi soulteary!

I was just playing my own Outline installation, it's not based on this repo (which uses multiple subdomains), but the config is basically the same, since Outline is just configured through environment variables. And your repo is full of inspiration! It's such a treasure!

I noticed that in your blog post, there is only a "Continue with SSO" button on the sign-in page, which redirects the user to OIDC portal. However in my environment, there's also a "Continue with email" button which, when clicked and typed an email address, would trigger Outline to send a "magic sign-in link" to said email. I believe this was added to Outline years ago.

I want this feature disabled, it should be doable, right? (since your installation does not have that button) I've looked through official Outline codebase and your configuration example, but did not find anything that controls this behavior. Would you mind sharing some experience on this?

Can not use DB host var

outline.yml

      # DB
      - DATABASE_URL=${DATABASE_URL}
      - PGSSLMODE=${PGSSLMODE}
      - REDIS_URL=${REDIS_URL}

.env:
DOCKER_POSTGRES_HOST=ip.xxx
...
DATABASE_URL=postgres://${DOCKER_POSTGRES_USER}:${DOCKER_POSTGRES_PASS}@${DOCKER_POSTGRES_HOST}:5432/${DOCKER_POSTGRES_DBNAME}

outline容器启动报错

ERROR: connect ECONNREFUSED 127.0.0.1:5432

error Command failed with exit code 1.

ERROR: Version mismatch

Hi, thanks for this very useful project !
While trying to insall I got that mistake :

ERROR: Version mismatch: file ./docker-compose.postgres.yml specifies version 3.0 but extension file ./docker-compose.sso.yml uses version 3.6

How can I solve this ?

All containers up and healthy, can't access nothing

Hi.

I followed all the steps and even tried to change the lab.com domain for another one I had accessible.
The containers run and all of them are healthy. I can access them also (exec -it /bin/sh)

But I can't access in any browser or computer any page (minio, outline, nothing)

Host is a macOS (Intel)
Docker updated today to last version
All configuration of docker reset to default

What I can do to test using only localhost without any domain and send you the logs if I still can't access it?

Can't access from outside

Hi, I'm really sorry to disturb again.
I had a hard (and long) time trying to understand what's wrong in my setup but I failed !

I'm trying to install your self-hosted friendly outline version in a VPS I own, IPv4 1.2.3.4.

DNS
I own domain.com domain name.
I have setup my DNS zone :
docs.domain.com --> A 1.2.3.4
file.domain.com --> A 1.2.3.4
file-admin.domain.com --> A 1.2.3.4
sso.domain.com --> A 1.2.3.4
attachment.domain.com --> A 1.2.3.4

Environment
Ubuntu 20.04 with docker and docker-compose (1.29.2) as suggested

Setup
I have carefully followed all your steps
For the .env file I have only changed all urls to my own domain.com. Nothing else

Installation and running
Everything runs perfectly. All systems healthy. Nothing strange in the logs

Usage
Whatever url I use from all above urls, I get a connection refused from the server.
Seems like there is something to change in the Traefik labels, but I don't know why ?
I have tried to read https://soulteary.com/2020/12/02/traefik-2-basic-authorization-verification-part-1.html but I don't see what's different from the default setup of docker-outline ?

If you mind taking 2 minutes to give me another hint about where should I search to go forward that would be really helpful. Thanks in advance !

Moreover I've seen your PR in outline official repository. Many thanks for trying to help basic users like me self-hosting Outline software !

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.