Quantcast
Channel: Discourse Meta - Latest topics
Viewing all 60279 articles
Browse latest View live

Help with Multisite Installation

0
0

@netfox wrote:

Hi,

Can any one guide me how to fix this error while boot strapping web_only?

./launcher bootstrap web_only

RuntimeError: cd /var/www/discourse && sudo -E -u discourse bundle exec rake multisite:migrate failed with return #<Process::Status: pid 164 exit 1>
Location of failure: /pups/lib/pups/exec_command.rb:105:in `spawn'
exec failed with the params "cd /var/www/discourse && sudo -E -u discourse bundle exec rake multisite:migrate"
bc2ddaeb6124f5163d0ec5b1539f6b5ef9ba388a60bd90ade9914493eab5caa7
FAILED TO BOOTSTRAP

Here are my YML files

web_only.yml

templates:
  - "templates/sshd.template.yml"
  - "templates/web.template.yml"
  - "templates/web.ratelimited.template.yml"
expose:
  - "80:80"
  - "2222:22"
params:
  version: tests-passed
env:
  LANG: en_US.UTF-8
  UNICORN_WORKERS: 4
  DISCOURSE_DEVELOPER_EMAILS: 'xxx@xxx.xxx'
  DISCOURSE_DB_SOCKET: ''
  DISCOURSE_DB_PASSWORD: xxxx
  DISCOURSE_DB_HOST: xxx
  DISCOURSE_HOSTNAME: 'site1.domain.com'
  DISCOURSE_REDIS_HOST: xxxxxxxx
  # don't forget to set mail
  DISCOURSE_SMTP_ADDRESS: smtp.mandrillapp.com
  DISCOURSE_SMTP_PORT: 587
  DISCOURSE_SMTP_USER_NAME: xxx@xxx.xxx
  DISCOURSE_SMTP_PASSWORD: xxxxxxxxxxxxxxxxx
volumes:
  - volume:
        host: /var/docker/shared
        guest: /shared
hooks:
  after_code:
    - exec:
        cd: $home/plugins
        cmd:
          - mkdir -p plugins
          - git clone https://github.com/discourse/docker_manager.git
hooks:
  after_code:
    - file:
        path: /var/www/discourse/config/multisite.yml
        contents: |
         secondsite:
           adapter: postgresql
           host: xxxxxxxxxxxx
           database: b_discourse
           username: discourse
           password: xxxxxxxxxx
           pool: 25
           timeout: 5000
           db_id: 2
           host_names:
             - site2.domain.com

         thirdsite:
           adapter: postgresql
           host: xxxxxxxxxx
           database: c_discourse
           username: discourse
           password: xxxxxxxxxxx
           pool: 25
           timeout: 5000
           db_id: 3
           host_names:
              - site3.domain2.com
    - exec:
        cd: /var/www/discourse/plugins
        cmd:
          - mkdir -p plugins
          - git clone https://github.com/discourse/docker_manager.git
  after_web:
    - exec: cd /var/www/discourse && sudo -E -u discourse bundle exec rake multisite:migrate
run:
  - exec: echo "Beginning of custom commands"

  - exec: echo "End of custom commands"
  - exec: awk -F\# '{print $1;}' ~/.ssh/authorized_keys | awk 'BEGIN { print "Authorized SSH keys for this container:"; } NF>=2 {print $NF;}'

data.yml

templates:
  - "templates/postgres.template.yml"
  - "templates/redis.template.yml"
  - "templates/sshd.template.yml"

expose:
  - "5432:5432"
  - "6379:6379"
  - "2221:22"

params:
  db_default_text_search_config: "pg_catalog.english"
env:
  LANG: en_US.UTF-8
hooks:
  after_postgres:
    - exec:
        stdin: |
          alter user discourse with password 'xxxxx';
        cmd: sudo -u postgres psql discourse
        raise_on_fail: false
volumes:
  - volume:
        host: /var/docker/shared
        guest: /shared

hooks:
  after_postgres:
     - exec: sudo -u postgres createdb b_discourse || exit 0
     - exec:
          stdin: |
            grant all privileges on database b_discourse to discourse;
          cmd: sudo -u postgres psql b_discourse
          raise_on_fail: false

     - exec: /bin/bash -c 'sudo -u postgres psql b_discourse <<< "alter schema public owner to discourse;"'
     - exec: /bin/bash -c 'sudo -u postgres psql b_discourse <<< "create extension if not exists hstore;"'
     - exec: /bin/bash -c 'sudo -u postgres psql b_discourse <<< "create extension if not exists pg_trgm;"'
hooks:
   after_postgres:
     - exec: sudo -u postgres createdb c_discourse || exit 0
     - exec:
           stdin: |
             grant all privileges on database c_discourse to discourse;
           cmd: sudo -u postgres psql c_discourse
           raise_on_fail: false

     - exec: /bin/bash -c 'sudo -u postgres psql c_discourse <<< "alter schema public owner to discourse;"'
     - exec: /bin/bash -c 'sudo -u postgres psql c_discourse <<< "create extension if not exists hstore;"'
     - exec: /bin/bash -c 'sudo -u postgres psql c_discourse <<< "create extension if not exists pg_trgm;"'

Posts: 1

Participants: 1

Read full topic


Add how to change attachment size in the Docker install guide

0
0

@dandv wrote:

I've just installed Discourse by following the 30-minute Docker guide. Pretty painless.

While configuring the site, the first thing that I had to change was the maximum image and attachment size. Turns out that the "nginx/apache" config file had to be modified.

screenshot

While the Docker install boasts that you can install Discourse while inebriated and need as much Linux knowledge as your mom (barring the implicit political incorrectness in that statement), when it comes to changing the attachment size, you suddenly are left hanging.

As a first-time Docker user, it took me about 15 minutes to realize what web server was used (is Apached used in any installation guide?), figure out why there's no /etc/nginx, realize the going into the Docker instance isn't a permanent solution, then trawl through various topics on the subject until I found this one, advising to change app.yml:

- replace:
      filename: "/etc/nginx/conf.d/discourse.conf"
      from: /client_max_body_size.+$/
      to: client_max_body_size XXm;

There's no need to let users waste time like this. Adding a link to that post in the Docker install guide would save everyone time and frustration.

Posts: 3

Participants: 3

Read full topic

Default logo still showing up in shared links

0
0

@Pirat wrote:

when you insert a reference site, shows a standard black and white logo discourse
although I changed the logo

Posts: 7

Participants: 4

Read full topic

New user; my first post is gone

Images/GIF behave differently depending on if they are self-hosted or linked

0
0

@Moter8 wrote:

Extremely visible here:


Self-hosted on Discourse

Hosted on Imgur

Clicking on the Self-hosted one does nothing and there is no click counter
Clicking on the Imgur-hosted one opens the image in the current tab and a click is registered/counted


Self-hosted on Discourse

Hosted on Imgur

Clicking on the Self-hosted one opens the onebox... fine!
Clicking on the Imgur-hosted one again opens the image in the current tab.

Posts: 7

Participants: 3

Read full topic

Forcing email context

0
0

@lake54 wrote:

Thought I'd dive straight into Ruby for the first time and have a crack at implementing a feature me and some others would like to see in Discourse, a user option to force context in notification emails.

I've added the user option, that persists and is working fine.

I've modified a unit test to include a new parameter that I've added, that passes the same as it did before.

I've added a unit test to cater for the new parameter being set to true, that passes fine.

However, it doesn't work on my development system. The emails in mailcatcher still only have the latest reply in there, even when another 'user' has replied.

Any hints for where to look next?

Here's a diff up on Pastebin: http://pastebin.com/sqBxMQfc

Posts: 2

Participants: 1

Read full topic

CSS bug in box category style

How can we add data into user model after sigining with third party Oauth

0
0

@talnet wrote:

I am wondering if we can add/save some fields after parsing the return of a particular Oauth mechanism like Facebook.

We can get values like profile_url or profile_pic from the service and save it to show on a user's profile. Is it possible we save data after_authenticate or after_create_account ?

Posts: 1

Participants: 1

Read full topic


What is an IP address?

0
0

@Pirat wrote:

when I set the discourse I have the ip address of this type 172.17.42.1
what does this mean?

Posts: 6

Participants: 4

Read full topic

Topic details should show real filenames of attachments

0
0

@gerhard wrote:

Currently the topic details show links to the physical filename, which are kind of useless. Ideally the real filenames as used in the posts should be shown:



BTW: Can't we store uploaded files with their real filenames? How about creating a directory with the hash of the file and storing it there with its real filename? In case of multiple uploads of the same file a symlink could be used. So, /uploads/try2_discourse/102/ec5829847a91b748.log would become /uploads/try2_discourse/102/ec5829847a91b748/mysqld.log. I guess that could solve lots of problems like

Posts: 1

Participants: 1

Read full topic

Deleting an old user after re-assigning their one post

0
0

@watchmanmonitor wrote:

I have an old user I want out of our forum, but it had one post attributed.

I've just re-assigned the post to system, but I can't delete the user bc the admin says it's still got a post.

Posts Created 1
Can't delete all posts. Some posts are older than 300 days old. (The delete_user_max_post_age setting.)

Is there a periodic task which needs to run, or some other task which would allow me to delete the user? (without database diving)

Posts: 5

Participants: 4

Read full topic

Links to uploaded files in topic details are wrong (try.discourse.org)

0
0

@gerhard wrote:

I've just noticed that at try.discourse.org the links to uploaded files in the topic details are wrong.

Steps to reproduce:

The link in the topic details is:
http://try.discourse.org/uploads/try2_discourse/102/ec5829847a91b748.log

The actual working link (as seen in the post) is: http://virtual-host-discourse.global.ssl.fastly.net/uploads/try2_discourse/102/ec5829847a91b748.log

Posts: 1

Participants: 1

Read full topic

Using pups to iterate over multisite.yml

0
0

@eriko wrote:

So I have modified the pups files for web_only.yml to create and share multisite.yml in /var/shared so that i can access it in the container created by data.yml. My idea is to have the bootstrap in data.yml create missing databases in in multisite.yml to make adding more sites in the container in created by web_only.yml.

So my question is it possible to do this with pups or should I add a small script to do this work?

Posts: 3

Participants: 2

Read full topic

How to change the logo Url?

0
0

@wassame wrote:

Hello, I have discourse installed but its on a subdomain, I would like the logo to return the user to the original website, how might I do this? - Is there a snippet I can use or maybe a plugin?

Posts: 8

Participants: 6

Read full topic

Admin: Mute mention notifications for a single topic?

0
0

@jagregory wrote:

This is a hole I've dug myself into and I'm wondering if there's a way out.

I have a thread where there's a lot of people mentioned. Deliberately. It's a contact list of sorts, an organisation chart. We've mentioned people in their positions so it's easy for others to private message them about issues. I'm quite happy with this setup.

With one exception. Whenever any edits or replies to the post, 40 people get a notification email. So far this has happened once a day for the past week, which is less than ideal.

Is there any way, as an Admin or author of the thread, that I can turn off notifications for mentioned people for a particular thread?

Alternatively, anybody have any suggestions how I could achieve the same thing without spamming everyone?

Posts: 9

Participants: 6

Read full topic


Adding Canonical Redirects for SEO Optimization

0
0

@adrian2 wrote:

I apologize if there is an easy solution to this problem but I have searched this forum to no avail. I am trying to optimize our new Discourse forum for SEO, and it seems that multiple pages containing duplicate content can be accessed at different URLs, thus hurting search engine ranking by "splitting" the traffic for each duplicated page. So imagine we have some content at:

forum.foo.com/c/uncategorized

The issue is that this same exact page can also be accessed at:

forum.foo.com/c/uncategorized/l/latest?category_id=1&page=1

This means we need to add a canonical redirect from the second URL to the first by putting the tag ' link rel="canonical" href="http://forum.foo.com/c/uncategorized" ' in the page header when ever the URL "forum.foo.com/c/uncategorized/l/latest?category_id=1&page=1" gets loaded.

Is there any built-in support to do this in Discourse? This issue seems to really be hurting our search engine rankings as just about every category page has duplicate URLs at something like */l/latest?category_id=1&page=1. I do not mind doing some minor tinkering in the ruby-rails backend to get this done, but we would prefer not to dive into any complex hacks.

Posts: 3

Participants: 3

Read full topic

Request - gray out the password reset after use?

0
0

@watchmanmonitor wrote:

I just upgraded now, and I needed to set the password on a test account of mine.

After entering the email address in the reset field, I clicked "Reset Password"

then I realized the button was still green, so I did it again.

I got two emails, of course. Could we get that reset button to gray out after use (unless the page is refreshed)

Posts: 1

Participants: 1

Read full topic

403 errors after adding JS to header

0
0

@tcn33 wrote:

I'm getting a lot of 403 errors when doing anything - replying to posts, changing settings etc. This happened right after adding a bit of JS to the header, so I'm trying to remove it as step 1. Problem is, the errors prevent me from saving the changed header.

So that I can delete it manually, where are site customizations like this kept?

Posts: 4

Participants: 3

Read full topic

Placeholder texts showing instead of default translation string with tagging plugin

0
0

@Uninen wrote:

So I've just installed Discourse using Finnish locale and tagging plugin. Seems that latter isn't (fully?) translated yet, and the placeholder strings aren't very friendly. I assume you'd wanna show default (English) strings when something is not translated?

A couple of examples;

  • In the hamburger menu the "tags" string shows as: [fi.tagging.tags],
  • In post creation form instead of "choose optional tags for this topic" [fi.tagging.choose_for_topic] is shown,
  • etc.

Is there a simple workaround for this?

Posts: 4

Participants: 2

Read full topic

Help understanding the structure of using discourse + static website

0
0

@anomaly47 wrote:

Forgive me if this is really juvenile. I'm new to ruby dev.

So I have a beautiful installation of discourse up and running on digitalocean. I am waiting for my DNS servers to propogate now that I've directed them at my discourse IP on digitalocean.

The forum is working beautifully.

How and where can I build static content of the website around discourse?
E.g., I want someone to hit a static page prior to going to discourse, and then click "forum' in the nav.

Normally I would just open up the host and add the pages there, but I'm unsure how to do that on digitalocean.

Posts: 4

Participants: 2

Read full topic

Viewing all 60279 articles
Browse latest View live




Latest Images