Jump to content

discourse docker


Zan

Recommended Posts

Posted

I'd like to run the discourse Docker image, but not sure whether 1) I can run it as is from github, or 2) if unRAID-specific mods are required.

 

Can anyone advise and maybe provide some links to further reading?

Posted

Thanks for the tip Squid regarding the Community Apps setting.

 

I performed the search and tried to set up a docker container but got this error:
root@localhost:# /usr/local/emhttp/plugins/dynamix.docker.manager/scripts/docker run -d --name="discourse" --net="bridge" -e TZ="Australia/Sydney" -p 2222:22/tcp -v samsaffron/discourse
Error response from daemon: No command specified

 

Not really sure what to do - I'm not familiar with Dockerfile syntax etc.

 

Maybe I'd be better off with a minimal Ubuntu docker and then ssh into it as per instructions here: https://github.com/discourse/discourse/blob/master/docs/INSTALL-cloud.md

  • 1 year later...
Posted

I know this is a really old one, but anybody have a pointer to getting the Discourse docker loaded now? I tried Squid's suggestion above (adding DockerHub in CA), but it still doesn't find anything.

 

Thanks!

Posted
48 minutes ago, bdillahu said:

I know this is a really old one, but anybody have a pointer to getting the Discourse docker loaded now? I tried Squid's suggestion above (adding DockerHub in CA), but it still doesn't find anything.

 

Thanks!

ca.thumb.png.aba5499a1bd05bb397868b5bbfa267dc.png

 

114 results on a search for discourse

 

Posted (edited)

OK, duh... duh, and duh.

 

Read the instructions, bdillahu.

 

Sorry Squid, I was missing the "click here for further Docker results" right in my face.

 

 

Edited by bdillahu
Dumbness...
  • 3 years later...
Posted

I saw a youtube clip by IBRACORP on installing Discourse via an Ubuntu VM on Unraid and there was a comment about using bitnami's docker-compose to install it without using a VM, so I thought I'd give it a try, and I got it mostly working, it just needs some tweaks which I don't have the time for, to stop chromium (edge/chrome) from flagging it as untrusted.

 

For anyone interested here were my steps:

1. Setup CNAME for discourse.<mydomain>

2. Change ddclient.conf to enable dynamic DNS for CNAME

3. Installed portainer docker through Community Apps, and docker-compose via pip from command line (and in unraid /boot/config/go for future re-starts)

4. I wanted to use gmail for SMTP for my discourse installation so created an app-specific password for Discourse via account.google.com

5. Made the following changes to bitnami's docker-compose.yml file:

  • Changed port to - '3000:3000' 
  • Added /mnt/user/appdata/discourse prefix for all volumes (eg. redis_data -> /mnt/user/appdata/discourse/redis_data)
  • Added the following environment variables for discourse and sidekiq services:
  •       - DISCOURSE_HOSTNAME=discourse.<mydomain>
          - SMTP_HOST=smtp.gmail.com
          - SMTP_PORT=587
          - SMTP_USER=<my gmail login>
          - SMTP_PASSWORD=<app specific password>
  • Added your reverse proxy docker network to discourse service
  •     networks:
          - proxynet
  • Added the following to the end of the docker-compose.yml file to flag it as an externally-created docker network:
  • networks:
      proxynet:
        external: true

6. Added discourse subdomain to swag subdomains variable to have swag create a new certificate for the subdomain.

7. Added the following proxy conf to nginx (/mnt/cache/appdata/swag/nginx/proxy-confs/discourse.subdomain.conf) for discourse (note that the IP address was hard-coded by getting the IP address for the discourse docker after first start, as I couldn't figure out how to modify the line
        #set $upstream_app discourse_discourse_1;
in order to have nginx automatically figure out the IP address):

 

## Version 2020/12/09
# make sure that your dns has a cname set for discourse and that your discourse container is not using a base url

server {
    listen 443 ssl;
    listen [::]:443 ssl;

    server_name discourse.*;

    include /config/nginx/ssl.conf;

    client_max_body_size 0;

    # enable for ldap auth, fill in ldap details in ldap.conf
    #include /config/nginx/ldap.conf;

    # enable for Authelia
    #include /config/nginx/authelia-server.conf;

    location / {
        # enable the next two lines for http auth
        #auth_basic "Restricted";
        #auth_basic_user_file /config/nginx/.htpasswd;

        # enable the next two lines for ldap auth
        #auth_request /auth;
        #error_page 401 =200 /ldaplogin;

        # enable for Authelia
        #include /config/nginx/authelia-location.conf;

        include /config/nginx/proxy.conf;
        resolver 127.0.0.11 valid=30s;
        #set $upstream_app discourse_discourse_1;
        set $upstream_app 172.18.0.12;
        set $upstream_port 3000;
        set $upstream_proto http;
        proxy_pass $upstream_proto://$upstream_app:$upstream_port;

    }
}
 

 

Hope this helps anyone who wants to give discourse on their server a try.

I'm trying to put together a site for a sport club and ultimately decided that discourse wouldn't suit my needs, so haven't bothered to https and proxy-conf issues that I came across.

  • Thanks 1
  • 2 years later...
  • 2 months later...
Posted (edited)

 

On 4/25/2021 at 6:21 AM, Zan said:

I saw a youtube clip by IBRACORP on installing Discourse via an Ubuntu VM on Unraid and there was a comment about using bitnami's docker-compose to install it without using a VM, so I thought I'd give it a try, and I got it mostly working, it just needs some tweaks which I don't have the time for, to stop chromium (edge/chrome) from flagging it as untrusted.

 

For anyone interested here were my steps:

1. Setup CNAME for discourse.<mydomain>

2. Change ddclient.conf to enable dynamic DNS for CNAME

3. Installed portainer docker through Community Apps, and docker-compose via pip from command line (and in unraid /boot/config/go for future re-starts)

4. I wanted to use gmail for SMTP for my discourse installation so created an app-specific password for Discourse via account.google.com

5. Made the following changes to bitnami's docker-compose.yml file:

  • Changed port to - '3000:3000' 
  • Added /mnt/user/appdata/discourse prefix for all volumes (eg. redis_data -> /mnt/user/appdata/discourse/redis_data)
  • Added the following environment variables for discourse and sidekiq services:
  •       - DISCOURSE_HOSTNAME=discourse.<mydomain>
          - SMTP_HOST=smtp.gmail.com
          - SMTP_PORT=587
          - SMTP_USER=<my gmail login>
          - SMTP_PASSWORD=<app specific password>
  • Added your reverse proxy docker network to discourse service
  •     networks:
          - proxynet
  • Added the following to the end of the docker-compose.yml file to flag it as an externally-created docker network:
  • networks:
      proxynet:
        external: true

6. Added discourse subdomain to swag subdomains variable to have swag create a new certificate for the subdomain.

7. Added the following proxy conf to nginx (/mnt/cache/appdata/swag/nginx/proxy-confs/discourse.subdomain.conf) for discourse (note that the IP address was hard-coded by getting the IP address for the discourse docker after first start, as I couldn't figure out how to modify the line
        #set $upstream_app discourse_discourse_1;
in order to have nginx automatically figure out the IP address):

 

## Version 2020/12/09
# make sure that your dns has a cname set for discourse and that your discourse container is not using a base url

server {
    listen 443 ssl;
    listen [::]:443 ssl;

    server_name discourse.*;

    include /config/nginx/ssl.conf;

    client_max_body_size 0;

    # enable for ldap auth, fill in ldap details in ldap.conf
    #include /config/nginx/ldap.conf;

    # enable for Authelia
    #include /config/nginx/authelia-server.conf;

    location / {
        # enable the next two lines for http auth
        #auth_basic "Restricted";
        #auth_basic_user_file /config/nginx/.htpasswd;

        # enable the next two lines for ldap auth
        #auth_request /auth;
        #error_page 401 =200 /ldaplogin;

        # enable for Authelia
        #include /config/nginx/authelia-location.conf;

        include /config/nginx/proxy.conf;
        resolver 127.0.0.11 valid=30s;
        #set $upstream_app discourse_discourse_1;
        set $upstream_app 172.18.0.12;
        set $upstream_port 3000;
        set $upstream_proto http;
        proxy_pass $upstream_proto://$upstream_app:$upstream_port;

    }
}
 

 

Hope this helps anyone who wants to give discourse on their server a try.

I'm trying to put together a site for a sport club and ultimately decided that discourse wouldn't suit my needs, so haven't bothered to https and proxy-conf issues that I came across.

2 years old but i need help please

 

Screenshot from 2024-04-11 11-23-45.png

707221714_Screenshotfrom2024-04-1111-30-24.thumb.png.b6976052f26c5a76b6a5d6e29ee4fc91.png1076452871_Screenshotfrom2024-04-1111-30-54.thumb.png.2a02e2a17e3d3249f3a8da11c3ccd4ca.png

Edited by Tweak91

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...