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

Avoid need to rebuild web container after reboot?

$
0
0

Jason Ives wrote:

I don't need to reboot my host or restart docker very often but it has come up a couple times recently.

The problem is that when docker restarts containers are not being assigned the IPs they previously used -- a data container might have been 172.17.0.2 before but is 172.17.0.9 after a reboot. Because of this the web container is unable to connect to a database and I am forced to find my data container's IP, reconfigure and rebuild the web container.

I'd love to avoid this.

Thinking that I could at least avoid the need to look up and reconfigure the ip (skipping straight to launcher rebuild) I have tried linking the containers but I am unable to bootstrap when doing so - it fails when trying to connect to the database, unable to resolve the host; I am using 'data' for the link alias and 'data' for DISCOURSE_DB_HOST/DISCOURSE_REDIS_HOST.

What can I do to make life easier? I'd like to at least have the link work. Better still I'd love to have static IPs for my containers so that regardless of what order things were automatically started in everything would be connected once all containers started.

Posts: 4

Participants: 4

Read full topic


Put in a vote for Discourse in Zapier apps

Constant 500 Internal Server Errors

$
0
0

Kirupa Chinnathambi wrote:

Hi, everyone!
For the past week since we moved to using discourse, our forum installation (http://forum.kirupa.com) is constantly throwing 500 Internal Server error messages. Checking through the logs, nothing seems out of the ordinary. I was watching my processes a few moments ago, and about 5 minutes before the errors started appearing, this is what I saw:

USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
discour+    90  0.4 12.8 545920 264392 ?       Sl   Nov05   0:38 sidekiq 3.2.5 discourse [0 of 5 busy]
discour+   128  0.4 12.0 485496 247020 ?       Sl   Nov05   0:41 unicorn worker[2] -E production -c config/unicorn.conf.rb
discour+   116  0.4 11.8 481400 242492 ?       Sl   Nov05   0:43 unicorn worker[0] -E production -c config/unicorn.conf.rb
discour+   122  0.3 11.8 1048164 242288 ?      Sl   Nov05   0:30 unicorn worker[1] -E production -c config/unicorn.conf.rb
postgres 10002  3.1 11.5 422128 236708 ?       Ss   02:00   0:08 postgres: discourse discourse [local] idle
postgres 10025  5.1 11.3 397684 232976 ?       Ss   02:01   0:12 postgres: discourse discourse [local] idle
discour+    59  0.2 10.9 459696 224712 ?       Sl   Nov05   0:25 unicorn master -E production -c config/unicorn.conf.rb
postgres   325  0.0 10.7 396600 219640 ?       Ss   Nov05   0:02 postgres: discourse discourse [local] idle
postgres  8908  0.3  7.9 397376 162688 ?       Ss   01:44   0:04 postgres: discourse discourse [local] idle
postgres  9940  2.2  7.8 422128 161112 ?       Ss   01:59   0:07 postgres: discourse discourse [local] idle
discour+  7730  0.7  6.8 621904 140188 pts/0   Sl+  01:26   0:17 pry

Is anything out of the ordinary here?

The only workaround I've found is for me to restart the DigitalOcean droplet. That seems to fix things for a few hours before the errors start occurring.

Cheers,
Kirupa

Posts: 6

Participants: 5

Read full topic

Decoupling Discourse views from backend

$
0
0

Itamar Syn Hershko wrote:

So we were looking at implementing a backend for discourse using a technology other than Ruby (and we are aware of the various discussions made on the topic in the past).

We were pretty sure Discourse relies heavily on REST APIs and as such this change would be relatively easy - basically just ship the statics somehow to the client and then have them talk with our non-Ruby API clone.

However we could have not been more wrong. Discourse seems to be completely view-based and not rely on REST at all.

Are there plans to detach the client bits from the server bits in such a way that would allow implementing more backends? to us, Discourse is more of a client-side and UI magic.

Thanks for all your hard work

Posts: 6

Participants: 5

Read full topic

Support required for custom import script?

$
0
0

san wrote:

Hi I am trying to modify PHPBB3 import script to create users from a database. Here is my code

require File.expand_path(File.dirname(__FILE__) + "/../../config/environment")
require File.expand_path(File.dirname(__FILE__) + "/base.rb")
#require_dependency 'url_helper'
#require_dependency 'file_helper'
require "mysql2"
class ImportScripts::AlayaranSO < ImportScripts::Base
  include ActionView::Helpers::NumberHelper
  PHPBB_DB   = "alayaran_so"
  BATCH_SIZE = 1000
  ORIGINAL_SITE_PREFIX = "oldsite.com" # without http(s)://
  NEW_SITE_PREFIX      = "http://www.alayaran.com"  # with http:// or https://
  # Set PHPBB_BASE_DIR to the base directory of your phpBB installation.
  # When importing, you should place the subdirectories "files" (containing all
  # attachments) and "images" (containing avatars) in PHPBB_BASE_DIR.
  # If nil, [attachment] tags and avatars won't be processed.
  # Edit AUTHORIZED_EXTENSIONS as needed.
  # If you used ATTACHMENTS_BASE_DIR before, e.g. ATTACHMENTS_BASE_DIR = '/var/www/phpbb/files/'
  # would become                                  PHPBB_BASE_DIR       = '/var/www/phpbb'
  # now.
  PHPBB_BASE_DIR        = '/var/www/phpbb'
  AUTHORIZED_EXTENSIONS = ['jpg', 'jpeg', 'png', 'gif', 'zip', 'rar', 'pdf']
  # Avatar types to import.:
  #  1 = uploaded avatars (you should probably leave this here)
  #  2 = hotlinked avatars - WARNING: this will considerably slow down your import
  #                          if there are many hotlinked avatars and some of them unavailable!
  #  3 = galery avatars   (the predefined avatars phpBB offers. They will be converted to uploaded avatars)
  IMPORT_AVATARS       = [1, 3]
  def initialize
    super
    @client = Mysql2::Client.new(
      host: "172.16.22.1",
      username: "sn",
      password: "abc@123",
      database: PHPBB_DB
    )
    phpbb_read_config
  end
  def execute
    import_users
    #import_posts
  end
  def import_users
    puts '', "creating users"
    total_count = mysql_query("SELECT count(*) count FROM user WHERE 1;").first['count']
    batches(BATCH_SIZE) do |offset|
      results = mysql_query(
        "SELECT id, username, name, about, email, loc, createdate,img
           FROM user u
          WHERE 1
          ORDER BY u.id ASC
          LIMIT #{BATCH_SIZE}
         OFFSET #{offset};")
      break if results.size < 1
      create_users(results, total: total_count, offset: offset) do |user|
        { id: user['id'],
          email: user['email'],
          username: user['username'],
                  name: user['name'],
          created_at: Time.zone.at(user['createdate']),
                  active:"TRUE",
                  approved:"TRUE"
        }
      end
    end
  end

I have install the forum which was bitnami discourse 1.0.3 www.alayaran.com

I tried the above code to run like this

alayaran@server:/opt/discourse-1.0.3-0/apps/discourse/htdocs$script/import_scripts/alayaran_so.rb

But the following errors encountered. I dont know how to proceed

/opt/discourse-1.0.3-0/ruby/lib/ruby/gems/2.0.0/gems/bundler-1.7.0/lib/bundler/runtime.rb:76:in `require': cannot load such file -- rb-inotify (LoadError)
        from /opt/discourse-1.0.3-0/ruby/lib/ruby/gems/2.0.0/gems/bundler-1.7.0/lib/bundler/runtime.rb:76:in `block (2 levels) in require'
        from /opt/discourse-1.0.3-0/ruby/lib/ruby/gems/2.0.0/gems/bundler-1.7.0/lib/bundler/runtime.rb:72:in `each'
        from /opt/discourse-1.0.3-0/ruby/lib/ruby/gems/2.0.0/gems/bundler-1.7.0/lib/bundler/runtime.rb:72:in `block in require'
        from /opt/discourse-1.0.3-0/ruby/lib/ruby/gems/2.0.0/gems/bundler-1.7.0/lib/bundler/runtime.rb:61:in `each'
        from /opt/discourse-1.0.3-0/ruby/lib/ruby/gems/2.0.0/gems/bundler-1.7.0/lib/bundler/runtime.rb:61:in `require'
        from /opt/discourse-1.0.3-0/ruby/lib/ruby/gems/2.0.0/gems/bundler-1.7.0/lib/bundler.rb:133:in `require'
        from /opt/discourse-1.0.3-0/apps/discourse/htdocs/config/application.rb:15:in `<top (required)>'
        from /opt/discourse-1.0.3-0/ruby/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
        from /opt/discourse-1.0.3-0/ruby/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
        from /opt/discourse-1.0.3-0/apps/discourse/htdocs/config/environment.rb:2:in `<top (required)>'
        from /opt/discourse-1.0.3-0/ruby/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
        from /opt/discourse-1.0.3-0/ruby/lib/ruby/site_ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
        from apps/discourse/htdocs/script/import_scripts/alayaran_so.rb:1:in `<main>'

Posts: 1

Participants: 1

Read full topic

What to make of the Google Cloud Container announcement

$
0
0

TheLoneCuber wrote:

I've saw seen a flurry of tweets about the Google Cloud Contain Engine announcement, especially in reference to Docker. The Container Engine is clearly labelled "Alpha", but apart from that label, is it Discourse-ready?

Posts: 1

Participants: 1

Read full topic

docker_manager discourse upgrade stuck at "Upgrading..."

$
0
0

PJH wrote:

1) Went to /admin/upgrade
2) Noted that discourse had new commits that could be applied.
3) Clicked upgrade
4) Upgrade stuck on log mentioning a few times (sorry - didn't copy/paste) that vacuuming could only be done by root or db user
5) Stuck on that last message for 1/2 hour.
6) Clicked "Reset Upgrade"
7) That was some time ago and the system is still stuck on "Currently Upgrading..." on the main upgrade page, and "Reset Upgrade" still available on the progress page.

I don't have access to the ssh shell to do diagnostics/anything else.

I will note that I normally do 1-3 daily without a problem - the last time being around this time yesterday.

Anyone any suggestions, or am I basically stuck waiting for someone with ssh access to do something?

Posts: 2

Participants: 2

Read full topic

Is there a way to remove 'categories' from the page title and search results?

$
0
0

David Liaw wrote:

This is more nit picky than anything else, but is there a way to way to remove the 'Categories' text from the page title (text in the tab) and in turn, search results?

We have the categories list as the default landing page, so the search result looks like this:

as opposed to just the site title.

I've haven't had time to dig through the code for the solution, but I suspect that I'll have to edit the handlebars templates.

Any ideas?

Posts: 1

Participants: 1

Read full topic


How would I go about adding a script site-wide?

$
0
0

Wint wrote:

See this link:

http://xivdb.com/?tooltip

I want these tooltips to work on any topic on the site. I'm mainly a C++ programmer that dabbles with web development, so I think I should be able to figure this out with minimal help. I just don't even know where to start. Any help would be appreciated.

Posts: 1

Participants: 1

Read full topic

New Reply Notifications in Website Title

$
0
0

patrick wrote:

I would like the title of my site to change, according to whether or not there are new replies on the current page that I have not read.

So for example, if I have my browser up, I wouldn't need to be viewing the discourse website to see if a new reply was posted. Instead I would be able to tell by the title (which displays on the tab), if there are new messages to read.

Does discourse already have this feature?

Posts: 6

Participants: 3

Read full topic

How is word censoring supposed to work?

Anyone else getting a lot of spam of this variant?

$
0
0

Lisa Wess wrote:

Is anyone else seeing a lot of spam on their discourse installations? We get a lot of spam that looks like this:

https://www.dropbox.com/s/qh90hidkw8ll5p8/spam.txt?dl=0

I'm curious how others have approached this and if it is a more widespread issue on Discourse forums. I can tell from Google it's a widespread issue on a variety of other forums. frowning

I had the thought that if censored words had an option to block a post that contained a phrase, I could put the phone number from these spam posts in there. Might that be an option in the future? Or more robust spam controls? We're getting 10+ of these a day and that's a slow spam day.

Thank you.

Posts: 3

Participants: 4

Read full topic

Changing the base URL in emails

$
0
0

Thomas Davids wrote:

How do you change the base URL that shows up in emails (and possibly other places as well, although I haven't seen it anywhere else yet)? Right now my email address confirmation emails send the user to a link like "http://www.example.com/users/authorize-email/8af4b4f2a9411f7029d39c05b7024c40", but I want to send them to my domain (and not www.example.com).

Thanks in advance!

Thomas

Posts: 2

Participants: 1

Read full topic

Update discourse hostname

$
0
0

James Smith wrote:

I'm running w/ Docker on Ubuntu on Digital Ocean. I have tried updating the hostname in the app.yml file then doing a launcher rebuild, but it doesn't change anything. I also tried manually navigating into the directory of the docker container and updating discourse.conf to have the correct hostname and not my IP address, but emails still get sent out with the IP address. What am I missing?

Posts: 1

Participants: 1

Read full topic

Include performance improvements in release notes?


About the RFC category

$
0
0

Sam Saffron wrote:

Request for Comments.

Detailed specification for a feature in the "features" category, that is open for Discussion.

Once ratified and approved by the team it will be moved to the "spec" category.

Posts: 4

Participants: 2

Read full topic

Category label in notification email unreadable due to colors

$
0
0

Dean Taylor wrote:

I have just received an email notification for this post:

Looking at the screen shot here - you can see that the feature label is unreadable in GMail due to the colours used.

The styles for the text are:

And here is the source snippet code in the email source:
<a href="https://meta.discourse.org/category/feature" style="background-color: #0E76BD; color: #FFFFFF; text-decoration: none; font-weight: bold; color: #006699;">feature</a>

Note that the color value is specified twice.

Posts: 3

Participants: 3

Read full topic

Category-Specific Moderators, phase 1 RFC

$
0
0

Jason May wrote:

Preliminary spec for this feature.

Overview

Moderator authority may optionally be assigned for a particular category and its subcategories rather than over the entire site.

  • This feature does not replace the existing whole-site moderator role.
  • This feature does not alter the site-global access privileges associated with Trust Levels.
  • The definition of "staff" (admin or global moderator) does not change with this feature. Category moderators are not considered to be staff.

A moderated category is not necessarily a private category. Restricting general access to the category remains an admin function using the current category security controls.

Authority

A category moderator will have authority to do the following, always restricted to the categories that they moderate:

  • appoint additional moderators for the categories
  • create sub-categories within the categories
  • appoint moderators for any sub-categories
  • (resign as moderator?)
  • delete, edit, wikify posts in the categories
  • delete, close, auto-close, reopen, archive, unlist/list topics in the cateogires
  • pin topic (category-scope pin, not global)
  • administer flags within categories they moderate
  • view activity log? (New feature)
  • block users from posting within a category? (New feature)
  • Change Category settings: color, name, description, security, auto-close time, images, badges-enabled.
    • Do NOT allow to change: Email-in address, Fixed position.
  • Change title and category for a topic, as long as they moderate both source and destination (NB: TL3 permissions will let them move topics anywhere)
  • change category name
  • restrict sub-category access
  • invite new members with access to the category (this does not override the the must_approve_users site setting)
  • view/export list of users who can post in that category? or are members of any group with write permission for that category? (should not include admin, site moderator, TL4s)

Category moderators will not have authority to:

  • pin topics globally
  • banner topics
  • move a topic to any category they do not moderate (unless also TL3)
  • administer flags in any category they do not moderate
  • view activity log for any category they do not moderate (new feature)
  • impersonate users

Category Moderator authority can also be assigned or removed by an admin or full site moderator. No automatic revocation of authority.

No changes to the standard authority structure for other (non-moderator) users to carry out actions in a moderated category.

UI Implications

UI switches that check if the user is a staff member will have to be reworked, as access to some moderation features can be had without being a full-site moderator.

No special badge for category moderators. Posts by category moderators will not be distinguished in any way from posts by other users.

Category Edit dialog

  • category moderator can see and use the Edit button & modal on the Category page
  • on the Security tab (edit_category_security.hbs), add editable list of moderators beneath the current Permissions section; user can appoint new moderators here

Need UI for...

  • create sub-category under moderated category (available to category moderators)

API Changes

  • add list of category moderators to JSON representation of a category
  • category#update options: add moderator appointment & dismissal

Implementation Notes

We already have a CategoryUser class. Add a moderator flag to that. But do not interfere with any existing notification_level setting. Default notification level for a newly-assigned moderator should be the maximum value.

Extend the existing Guardian functionality to cover moderator powers. Try to avoid making a new thing for this.

For the items listed above that relate to permissions and invites:

  1. every moderated category will have one associated group (generate a name for it from the category name?)
  2. these special category groups should not be visible to anyone besides that category moderator
  3. category moderator does not have authority to create additional groups
  4. category moderator may only change permissions for any sub-category, as follows: remove "everyone" access; add access for the category group (per 1. above).
  5. category moderators should not be able to fiddle with permissions for any of the other automatic groups (admins etc.)
  6. category moderator can use the Invite button at the bottom of any topic: such invites will include access to the category group.
  7. category moderator can use the Invite function to invite existing members into the category group, not just unregistered users.

Investigate every use of

  • User.where(moderator: true), where("...moderator...")
  • user.moderator?
  • notify_moderators
  • moderator_post
  • Guardian#can_moderate?(topic)

Implement the following:

  • category.appoint_moderator(user)
  • category.dismiss_moderator(user)
  • category.moderators
  • category.moderated?
  • user.moderated_categories

TBD

There can be multiple moderators for the same category. Can a moderator dismiss another moderator? Does this ability make a difference to other functionality? Perhaps the dismissal function should be only available to admins, at least in phase 1. If that is the case, then a moderator cannot resign, only be removed by admin.

Can moderator create additional groups within the category? i.e. subcategories with different group permissions.

Perhaps category-specific Trust Levels could be defined. Not in phase 1.

Feature discussion is at https://meta.discourse.org/t/category-specific-moderators/11668/99

Posts: 5

Participants: 3

Read full topic

Category-Specific Moderators, phase 2 RFC

$
0
0

Jason May wrote:

Category Administration Pages

Similar to the Admin Dashboard, but information restricted to a single category.

  • Users:Active, :New, :Suspended and :Blocked pages would only show users with access permission for that category
  • Users:Mods page would only show other moderators for that category

Category Moderator UI

  • Moderator gets a new "Moderator" button in their Profile page header
  • new Category Moderation page at /users/{username}/moderation
  • moderation page shows all moderated categories, listed alphabetically,
    with a summary stats block for each. Each block links to a per-category
    moderation page.
  • new Per-Category Moderation page at
    /users/{username}/moderation/{category-slug}
  • design TBD for the per-category moderation page: would be nice to put as
    much info on a single page as possible

Posts: 1

Participants: 1

Read full topic

Multi-Container Install - Redis

$
0
0

keelan wrote:

I've set up a multiple container install, using an external postgres DB (actually a paid), and a couple Discourse servers. I'm using Gluster to synchronize the uploads directories of the two app servers. Right now, I'm running a Redis instance per app server, and things seem to work except that each of the two app servers maintain independent sessions; meaning that if I use non-sticky load balancing, things will get sketchy.

Do matters pertaining to sessions live in the Redis DB? Would it make sense to pull the Redis instances out of the web servers, and make a separate Redis server? How are y'all handling high availability in those scenarios?

Posts: 2

Participants: 2

Read full topic

Viewing all 60739 articles
Browse latest View live




Latest Images