Installing GetOutline - An Emerging Knowledge Management System for your second brain

Currently reading
Installing GetOutline - An Emerging Knowledge Management System for your second brain

Thanks @one-eyed-king and apologies, I'll ensure I use the code blocks next time. Lesson learned. I've provided the code block below!

To answer your question, I created the network - "outline-internal" manually using Portainer. Its possible I may have not put the correct networking setup in so I can share that if you suspect that is the issue.

YAML:
version: "3"
services:
  outline_redis:
    image: redis
    container_name: outline_redis
    networks:
      - outline-internal
      
  outline_postgres:
    image: postgres
    container_name: outline_postgres
    env_file: /data/outline_postgres.env
    networks:
      - outline-internal
    volumes:
      - /volume1/docker/postgresql/db:/var/lib/postgresql/data

  outline_minio:
    image: minio/minio
    container_name: outline_minio
    volumes:
      - /volume1/docker/minio/data:/data
    ports:
      - 8995:9000
    env_file: /data/outline_minio.env
    networks:
      - nginx_default
    command: "server /data"
 
  outline:
    image: outlinewiki/outline
    container_name: outline
    # set this command instead to initialize/upgrade the db
    # command: sh -c "sleep 5 && yarn sequelize:migrate --env=production-ssl-disabled"
    command: yarn start --env=production-ssl-disabled
    ports:
      - 3000:3000
    depends_on:
      - outline_postgres
      - outline_minio
      - outline_redis
    env_file: /data/outline.env
    networks:
      - outline-internal
      - nginx_default

networks:
  outline-internal:
    external: true
  nginx_default:
    external: true
-- post merged: --

This is the network details for the "outline-internal" network:

1623539282975.png
 
(think) Wasn't the problem at hand that you wanted to use an existing redis instance that is manged outside the compose file?

Some ideas/questions regarding the compose file you shared:
1. Make sure you know what effect it has to use version "3": it is the short for "3.0" and not how most people would assume the lastest "3.x". This is important as some configuration items are introduced in later versions...
2. Is it by intention that the redis service has not volume mapping, and as such does not persist data outside the container?
3. While deploying the compose file, you should be able to set a project name in portainer (in the cli it's the param --project-name) which will be used as a prefix for all services, networks and volumes. This would allow to get rid of the prefix you added to the service names, networks and even most of the container names themself.
4. Try to use the key/value type of network declaration, as it will allow to provide further details for the interface in the network if needed (like alias names)
5. Make sure to use images and specific tags, otherwise you might end up troubleshooting why your stack stopped working. This can become a huge party breaker! For instance: a minor upgrade of the postgres image, will start to use a different data folder and as such make the database not see the previous state...
6. You can "override" the name of the default network created by docker-compose, by assigning it a name (which will be constant, and not beeing prefixed with the project name!)

I was going to decompose you compose file and externalize redis from it... until I saw redis in "depends_on". I am afraid depends on does not work for services declared in a different compose file.

Just to be sure: what is the current object that you try to achive?
 
(think) Wasn't the problem at hand that you wanted to use an existing redis instance that is manged outside the compose file?

Some ideas/questions regarding the compose file you shared:
1. Make sure you know what effect it has to use version "3": it is the short for "3.0" and not how most people would assume the lastest "3.x". This is important as some configuration items are introduced in later versions...
2. Is it by intention that the redis service has not volume mapping, and as such does not persist data outside the container?
3. While deploying the compose file, you should be able to set a project name in portainer (in the cli it's the param --project-name) which will be used as a prefix for all services, networks and volumes. This would allow to get rid of the prefix you added to the service names, networks and even most of the container names themself.
4. Try to use the key/value type of network declaration, as it will allow to provide further details for the interface in the network if needed (like alias names)
5. Make sure to use images and specific tags, otherwise you might end up troubleshooting why your stack stopped working. This can become a huge party breaker! For instance: a minor upgrade of the postgres image, will start to use a different data folder and as such make the database not see the previous state...
6. You can "override" the name of the default network created by docker-compose, by assigning it a name (which will be constant, and not beeing prefixed with the project name!)

I was going to decompose you compose file and externalize redis from it... until I saw redis in "depends_on". I am afraid depends on does not work for services declared in a different compose file.

Just to be sure: what is the current object that you try to achive?
Thanks for this @one-eyed-king , my objective is to get the GetOutline container working. I was using this install guide: Deploying Outline with Docker and Caddy – Guru Computing Blog

But I ran into the Redis connection issue.

On your point on the "depends_on" configuration, that was only something the person in the install guide used. I can totally remove that if you think it will be something to try. I'm just running out of ideas on what else I should try to get Redis connection setup.

Redis normally runs on port 6379 I believe. But I already have a running Redis instance from before. So could this be the reason for my connection issue? If so, then I guess I would have one of two options then right?
  • 1) Define this instance of Redis using the "port" variable and defining it with another port say : "Ports: - 6374:6379"

  • 2) Reuse the existing Redis container I already have running on port 6379 for this GetOutline container. But the problem with this approach is how would I edit my docker compose file to reflect that I want to reuse the existing Redis container from another config? Would you be able to show me what needs to change to reuse a container that is on another docker compose? I've copied the code for the already running Redis (which is being used by Authelia separately).
YAML:
version: "3.5"

services:
  redis:
    image: redis:latest
    network_mode: "bridge"
    container_name: redis
    volumes:
      - "/volume1/docker/redis:/data" # change the local path to your NAS location where you want the DB data to live
    ports:
      - "6379:6379"
    restart: always
 
Redis normally runs on port 6379 I believe. But I already have a running Redis instance from before. So could this be the reason for my connection issue?
Your compose file from above commes with an embedded redis that does not publish any ports...
The very same container port can be used from an unlimted number of containers, though if you publish container ports to a host port, the host port can only be bound once (regardless wether its bound by a native process on the host, or a host port of a container portmapping). Your stack private redis instance should be accessible from any container in your stack using the hostname "outline_redis" - it should work like it is, without any further changes. You just have to address it with the proper hostname...

Just out of curriousity: where do you configure the redis connection in outline?
 
Just out of curriousity: where do you configure the redis connection in outline?
part of the .ENV file for Outline itself.

Just got to play with it this morning and completed the setup (as individual containers, not part of a single stack, just so I can reuse some of my existing ones like Postgres and Redis). Writing an article on it, and will post some time today/tomorrow.

Screenshot 2021-06-21 at 13.19.01.png


Screenshot 2021-06-21 at 11.27.23.png


UPDATE: here is the article

 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Similar threads

VPN, Tor, Tailscale, proxy, cell phone data... Not worth risking NAS and your network security IMO...
Replies
4
Views
5,022
Please re-read everything I wrote. I gave you the exact hints what needs to be done for which option, and...
Replies
17
Views
3,565
Must have missed this topic early on. Looking at the documentation and the docker-compose nothing special...
Replies
2
Views
2,410
Great resource - esp one-eyed king. Addendum to entry #22 - I used MariaDB instead of MySQL (almost the...
Replies
39
Views
12,263

Welcome to SynoForum.com!

SynoForum.com is an unofficial Synology forum for NAS owners and enthusiasts.

Registration is free, easy and fast!

Trending threads

Back
Top