Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docker support #102

Open
ghost opened this issue May 25, 2019 · 72 comments
Open

docker support #102

ghost opened this issue May 25, 2019 · 72 comments

Comments

@ghost
Copy link

ghost commented May 25, 2019

Did you have a docker-compose for deploy ?

@Sathish-Globussoft
Copy link
Contributor

No, Currently we dont have.

@mihazs
Copy link

mihazs commented Jun 19, 2019

+1 for docker version

1 similar comment
@nickwild-999
Copy link

+1 for docker version

@leoborlot
Copy link

have you any one stack or docker compose?

@mtcaddy
Copy link

mtcaddy commented Aug 6, 2020

any update on docker? Happy to help.

@TechnologyClassroom
Copy link

The first step to making a docker compose script would be to make a bash script to install. No one has published one yet.

@rsmithlal
Copy link

I will take a look at what's required to get this running in docker and script the install process. This seems like an interesting and useful platform and if it can help us with our social media workload I would be happy to work with you to contribute this

@mtcaddy
Copy link

mtcaddy commented Aug 14, 2020

I will take a look at what's required to get this running in docker and script the install process. This seems like an interesting and useful platform and if it can help us with our social media workload I would be happy to work with you to contribute this

I'm happy to set it up with you.

@rsmithlal
Copy link

@mtcaddy sorry, I commented after just discovering the software and not trying it out. I signed up to the free plan of the commercial version and it had so many bugs that it was unusable. Lots of CORS issues in the front end. I would like this software to be worth my time, but right now it isn't.

@TechnologyClassroom
Copy link

TechnologyClassroom commented Aug 14, 2020

@rsmithlal Can you share your scripts? Making issues for the CORS issues would help too.

@rsmithlal
Copy link

@TechnologyClassroom I didn't end up writing more than just the initial couple of empty files because realized that I hadn't tried the software yet and had no idea what it was like or if it was worth investing time in. The bugs that I encountered were with the commercial production software and not the open source edition, and they don't have a clear way of reporting issues with that software as far as I could see. No contact email listed or open bug tracker portal.

@TechnologyClassroom
Copy link

@rsmithlal I see. I think this is also the bug tracker for that.

@stvhanna
Copy link

@rsmithlal Did you find an alternative since Socioboard appears to have bugs and not worth dockerizing right now?

@rsmithlal
Copy link

rsmithlal commented Nov 25, 2020 via email

@kenjibailly
Copy link

Would love to see docker support :)

@tiritibambix
Copy link

Oh yes please, we need this ;)

@ovizii
Copy link

ovizii commented Apr 21, 2022

sadly not going to happens since it has been "requested" for about 3 years already

@axe312ger
Copy link

How about you people create your own container setup and publish it?

Open Source is about collaboration :)

@ovizii
Copy link

ovizii commented Jun 14, 2022

How about you people create your own container setup and publish it?

Open Source is about collaboration :)

Very true, but my guess is people who could create their own container setup wouldn't be asking for one here :-)

@tiritibambix
Copy link

but my guess is people who could create their own container setup wouldn't be asking for one here

Very true. If I had the knowledge or the time to learn it, I wouldn't be asking here :p

@vaughngx4
Copy link
Contributor

Anyone still looking at this? I'm currently working on a Docker solution. However the lack of comprehensive documentation is making it quite difficult. Is there anyone I can discuss this with? I just need a breakdown on the configs(are they loaded individually? Does "NODE_ENV=development" decide whether "development.json" is loaded instead of "default.json"?). I have yet to use the software, but I would like to and don't mind contributing if it doesn't take up too much time. I'd have to dive into the code to find such things.

@vaughngx4
Copy link
Contributor

Uhh my bad, I have located developer docs. <3

@TechnologyClassroom
Copy link

@vaughngx4 The closest thing to GNU/Linux documentation is the work that was posted to issue 112. What I wrote earlier in this thread still applies. Once we have a functional bash script to install and configure a working site with sane defaults, a docker file would be trivial to make. On the other hand if someone were to make a docker compose file out of the findings from that issue, making a bash script from the docker file would also be trivial.

@vaughngx4
Copy link
Contributor

vaughngx4 commented Jul 1, 2022

@TechnologyClassroom Thanks! I am separating to avoid running all services in a single container, I won't separate the api from the frontend to avoid any unexpected errors. So far I have 3 containers being socioboard, socioboard-mysql and socioboard-mongo. Using alpine as the base image for the main container. Question: Is it necessary to set social media api details and/or mail details in the configs or can that be done via the frontend?

@TechnologyClassroom
Copy link

TechnologyClassroom commented Jul 1, 2022

Sounds reasonable. Carry on.

I think that is all handled in the configs, but I have not actually seen the web interface yet other than screenshots others have posted.

@vaughngx4
Copy link
Contributor

I faffed around with containerizing it on stream the other day if anyone is interested. Keep in mind I hadn't found all the docs and stuff at that point xD - https://www.twitch.tv/videos/1517387240

@jon4short
Copy link
Contributor

@TechnologyClassroom Thanks! I am separating to avoid running all services in a single container, I won't separate the api from the frontend to avoid any unexpected errors. So far I have 3 containers being socioboard, socioboard-mysql and socioboard-mongo. Using alpine as the base image for the main container. Question: Is it necessary to set social media api details and/or mail details in the configs or can that be done via the frontend?

The developers have mentioned in one of the setup videos that it has to be done in the configs in the backend. Not sure why as it does have a frontend for it.

@vaughngx4
Copy link
Contributor

vaughngx4 commented Jul 2, 2022

@jon4short I see, thank you. In the video above I was using sed but I've switched to editing with jq since the placeholders in the config files are not uniform. I've added Docker env vars for each entry in the config that needs to be changed. All local.socioboard.com and localhost entries will be replaced with the domain specified in Docker env. So there will be options to set all configs from the backend(copy pasted for like an hour but it works). Will open a PR when it's done.

@vaughngx4
Copy link
Contributor

@vaughngx4 The closest thing to GNU/Linux documentation is the work that was posted to issue 112. What I wrote earlier in this thread still applies. Once we have a functional bash script to install and configure a working site with sane defaults, a docker file would be trivial to make. On the other hand if someone were to make a docker compose file out of the findings from that issue, making a bash script from the docker file would also be trivial.

@TechnologyClassroom Are these 3 lines of config still necessary?

"base_path": "../../media",
"payment_path": "../../media/payments",
"template": "public/template/paymentTemplate.html"

@tiritibambix
Copy link

Docker container is ready to use. Admin UI and all.

That was fast ! Thank you so much !!

I still have to understand how to make it work though 😂

@tiritibambix
Copy link

https://github.com/socioboard/Socioboard-5.0/blob/master/Docker.README.md

Great ressource. Thank you. But there's more. Like, I need to understand how it literally works x)
Like where do I get FACEBOOK_API_APP_ID, FACEBOOK_API_APP_SECRET, TWITTER_API_KEY, TWITTER_API_SECRET, TWITTER_API_APP_NAME, etc...

And if ports 8000, 3000, 3001... are already in use, if I can change that.

I really got to study here :p

@vaughngx4
Copy link
Contributor

vaughngx4 commented Jul 7, 2022

@tiritibambix The API details you will have to get from facebook, twitter etc. (Google facebook api keys and go from there). I haven't actually connected any APIs myself yet. As far as ports go, you can change which ports are exposed in docker/docker-compose.yaml. For example: to change the port the frontend is served on to port 8989 we would change "8000:8000" to "8989:8000". You would also need to change the url scheme in docker/socioboard/init.sh to match (change port 8000 to 8989).

@vaughngx4
Copy link
Contributor

vaughngx4 commented Jul 7, 2022

@tiritibambix The API details you will have to get from facebook, twitter etc. (Google facebook api keys and go from there). I haven't actually connected any APIs myself yet. As far as ports go, you can change which ports are exposed in docker/docker-compose.yaml. For example: to change the port the frontend is served on to port 8989 we would change "8000:8000" to "8989:8000". You would also need to change the url scheme in docker/socioboard/init.sh to match (change port 8000 to 8989).

Regarding the API details, this gives the application functionality. The API details are used by the applications to perform functions like logging in, posting etc. These should not be linked to your personal accounts(you log in with those on the frontend).

The developers released the code for the SSO version of the application. It's still made for being deployed on the web(even though it isn't safe to do so).

@TechnologyClassroom
Copy link

This project should not duplicate the effort of rewriting documentation to get the API keys, but linking to the appropriate documentation for the various sites would be helpful to jump start people in the right direction.

@vaughngx4
Copy link
Contributor

@TechnologyClassroom I agree. I've been focused on the Docker version thus far but will write more documentation as I make progress with the application.

@TechnologyClassroom
Copy link

TechnologyClassroom commented Jul 7, 2022

At this rate, @vaughngx4 will squash all of the issues by next week. lol

@vaughngx4
Copy link
Contributor

At this rate, @vaughngx4 will squash all of the issue by next week. lol

Haha! Issues? What issues? :P

@tiritibambix
Copy link

@vaughngx4 Thank you so much for everything ❤️

@vaughngx4
Copy link
Contributor

@tiritibambix You're welcome :)

@kenjibailly
Copy link

@vaughngx4 Thanks for making this happen.

I installed Socioboard and got access to the web interface.
Although I seem to stumble upon a few problems.

  1. How do I login (which credentials) / Create an account? (doesn't seem to be working)
  2. Portforwarding using nginx isn't working as expected:
server {
    listen 443 ssl;
    listen [::]:443 ssl;

    server_name socioboard.mydomain.com;
    include /config/nginx/ssl.conf;
    client_max_body_size 0;

    location / {
        include /config/nginx/proxy.conf;
        resolver 127.0.0.11 valid=30s;
        set $upstream_app socioboard;
        set $upstream_port 8000;
        set $upstream_proto http;
        proxy_pass $upstream_proto://$upstream_app:$upstream_port;
    }
}
  1. Would be nice for a documentation about the .env as well, but I see you're already working on that, thanks for that!

@vaughngx4
Copy link
Contributor

vaughngx4 commented Jul 8, 2022

@kenjibailly I'm actually just fixing it as I try it out. There seems to be an issue with proxying currently, I'll check it out soon.

See Docker.README.md about creating an account (my fork, waiting for PR to merge). PR has been merged.

@vaughngx4
Copy link
Contributor

@kenjibailly See my latest PR. You can modify the nginx config if you'd like or simply put another nginx in front of the stack.

@kenjibailly
Copy link

kenjibailly commented Jul 13, 2022

@kenjibailly I'm actually just fixing it as I try it out. There seems to be an issue with proxying currently, I'll check it out soon.

See Docker.README.md about creating an account (my fork, waiting for PR to merge). PR has been merged.

@vaughngx4

I started with a clean install using the git clone today.
I added the Twilio info to the .env, sendgrid info added to env, changed domain name in env. I didn't change the rest.
Unfortunately I can't seem to make an account.
I don't get the desired notification, but rather get this one and takes forever to show up:
image

So naturally I don't get any records in adminbro:
image

Note: I made 1 small modification to the docker-compose as it gives me an error when executing being this one:

ERROR: Network scb-net declared as external but specifies additional attributes (driver, ipam).

To get rid of this I just commented the last 5 lines out like this:

    # driver: bridge
    # ipam:
    #   config:
    #     - subnet: 172.16.32.0/16
    #       gateway: 172.16.32.1

The network seems to be created with the desired preferences when looking in portainer (not 100% sure)
image
image

Let me know if I'm doing something wrong here.

Btw I'll have to try nginx later.

@vaughngx4
Copy link
Contributor

@kenjibailly So the undefined error is due to api services not running, could you check the output of docker exec -it socioboard su-exec socioboard pm2 logs. The command to create the docker network is in docker-build.sh sorry about that. Once the network is created the containers should start up fine.

@kenjibailly
Copy link

kenjibailly commented Jul 13, 2022

docker exec -it socioboard su-exec socioboard pm2 logs

@vaughngx4

So that means I can comment out the last 5 lines, correct?
It seems to connect with the desired containers, so I think that part is good.

So about the error logs, I couldn't find any that were triggered from the registration submit button.
I could however find these logs, but they are triggered when accessing the adminbro web page.

5|admin.se | Wed, 13 Jul 2022 15:07:34 GMT express-session deprecated undefined saveUninitialized option; provide saveUninitialized option at node_modules/admin-bro-expressjs/plugin.js:176:14
5|admin.se | Wed, 13 Jul 2022 15:08:11 GMT express-session deprecated undefined resave option; provide resave option at node_modules/admin-bro-expressjs/plugin.js:176:14
5|admin.se | Wed, 13 Jul 2022 15:08:11 GMT express-session deprecated undefined saveUninitialized option; provide saveUninitialized option at node_modules/admin-bro-expressjs/plugin.js:176:14
5|admin.se | @rollup/plugin-replace: 'preventAssignment' currently defaults to false. It is recommended to set this option to `true`, as the next major version will default this option to `true`.
5|admin.se | @rollup/plugin-replace: 'preventAssignment' currently defaults to false. It is recommended to set this option to `true`, as the next major version will default this option to `true`.
5|admin.se | @rollup/plugin-replace: 'preventAssignment' currently defaults to false. It is recommended to set this option to `true`, as the next major version will default this option to `true`.
5|admin.se | @rollup/plugin-replace: 'preventAssignment' currently defaults to false. It is recommended to set this option to `true`, as the next major version will default this option to `true`.
5|admin.se | Wed, 13 Jul 2022 15:17:40 GMT express-session deprecated undefined resave option; provide resave option at node_modules/admin-bro-expressjs/plugin.js:176:14
5|admin.se | Wed, 13 Jul 2022 15:17:40 GMT express-session deprecated undefined saveUninitialized option; provide saveUninitialized option at node_modules/admin-bro-expressjs/plugin.js:176:14
5|admin.se | @rollup/plugin-replace: 'preventAssignment' currently defaults to false. It is recommended to set this option to `true`, as the next major version will default this option to `true`.
5|admin.se | @rollup/plugin-replace: 'preventAssignment' currently defaults to false. It is recommended to set this option to `true`, as the next major version will default this option to `true`.
5|admin.se | @rollup/plugin-replace: 'preventAssignment' currently defaults to false. It is recommended to set this option to `true`, as the next major version will default this option to `true`.
5|admin.se | @rollup/plugin-replace: 'preventAssignment' currently defaults to false. It is recommended to set this option to `true`, as the next major version will default this option to `true`.
5|admin.se | Wed, 13 Jul 2022 16:49:59 GMT express-session deprecated undefined resave option; provide resave option at node_modules/admin-bro-expressjs/plugin.js:176:14
5|admin.se | Wed, 13 Jul 2022 16:49:59 GMT express-session deprecated undefined saveUninitialized option; provide saveUninitialized option at node_modules/admin-bro-expressjs/plugin.js:176:14

I get a bunch of things info logs as well (green) that seem to say that everything is ready.

Thank you for helping out mate :)

Edit: A thing worth mentioning is that when clicking the submit button on the registration page and even waiting when the "undefined" notification passes, makes the web page not load anymore. So basically something gets stuck.

@vaughngx4
Copy link
Contributor

vaughngx4 commented Jul 14, 2022

@kenjibailly Even though I added IPs they are not relevant, I'll look into changing how the network works but I'm not sure it will work without the last 5 lines. Try running the docker network create command from the build see script and uncommenting the 5 lines. The undefined error means the frontend can't reach the API. Are you using my fork with the latest updates? There were some domain issues I fixed, it could only run on localhost prior to the nginx update.

Edit: The frontend breaking could mean the container crashed, are the socioboard container logs fine?

@kenjibailly
Copy link

kenjibailly commented Jul 14, 2022

@kenjibailly Even though I added IPs they are not relevant, I'll look into changing how the network works but I'm not sure it will work without the last 5 lines. Try running the docker network create command from the build see script and uncommenting the 5 lines. The undefined error means the frontend can't reach the API. Are you using my fork with the latest updates? There were some domain issues I fixed, it could only run on localhost prior to the nginx update.

Edit: The frontend breaking could mean the container crashed, are the socioboard container logs fine?

@vaughngx4

Testing Socioboard Repo

I tried what you said with the current version on this github repo, but unfortunately I still keep getting the same error when docker-composing with the last 5 lines uncommented.

ERROR: Network scb-net declared as external but specifies additional attributes (driver, ipam).

With the 5 last lines in comments the containers, as said before, fire up.
When these are fired up using the 5 last commented lines I don't see any errors in the container logs of all 3 containers. Pretty weird, Everything says "connected" and similar stuff.

When I look into the network in portainer it shows that all 3 containers are in the network as desired.
image

I unfortunately can't find much on the error, and I'm assuming everything is connected and that this might not be the problem.
But that's just an assumption.


Testing vaughngx4 fork repo

Now I tried with your current fork ( https://github.com/vaughngx4/Socioboard-5.0 ) and this has a different outcome.
Same problem with the same last 5 lines in the docker-compose giving error:

ERROR: Network scb-net declared as external but specifies additional attributes (driver, ipam).

Going further with last 5 lines commented:
I tried to get the nginx working in my current nginx environment and it seems to be working with the files you provided.
However I seem to notice 2 things.

  1. When I try to create an account and hit "submit" the page just refreshes. No more notifications. Checked the admin panel, but as guessed the account hasn't been created.
  2. When the page refreshes / goes to another page the css doesn't get loaded for a few seconds. (not really a functionality problem here)

Damn, how hard can it be to create an account :p

Edit: I'll add the log files, maybe you can find something that is wrong here? I can't seem to spot an error according to these issues.

_socioboard-mysql_logs.txt
pm2_logs.txt
_socioboard_logs.txt
_socioboard-mongo_logs.txt

Edit: Got it to work on the fork, but the nginx is failing me in swag as discussed on Discord.

@vaughngx4
Copy link
Contributor

mixed content errors fixed. Thanks @kenjibailly for finding the fix!

@CountOlaf87
Copy link

I'm trying to run this behind my Traefik reverse proxy with letsencrypt ssl certs, everything starts up fine, but I'm getting some mixed content errors when loading css. How can I fix this?

@vaughngx4
Copy link
Contributor

@CountOlaf87 You have to force https. If the browser attempts to connect via http first, you will get mixed content errors. In nginx we managed to get it working using add_header 'Content-Security-Policy' 'upgrade-insecure-requests';

@CountOlaf87
Copy link

Did I mention I run it in docker? Could you guide me how to solve it?

@vaughngx4
Copy link
Contributor

vaughngx4 commented Aug 5, 2022

@CountOlaf87 I think this should work in Traefik:

labels:
  - "traefik.http.middlewares.testheader.headers.contentSecurityPolicy=upgrade-insecure-requests"

Reference: https://doc.traefik.io/traefik/middlewares/http/headers/

@CountOlaf87
Copy link

Thanks, but that doesn't seem to work, I'll have a look later to see if I can pass it on in the traefik config

@CountOlaf87
Copy link

Thanks @vaughngx4, Your comment did do the trick!

@lmoellendorf
Copy link

lmoellendorf commented Oct 2, 2022

I read this thread, especially #102 (comment). So I tried with vaughngx4 fork repo. I added the URLs mentioned in https://github.com/vaughngx4/Socioboard-5.0/blob/development/docker/nginx/ssl/SSL.README.md with my base domain to my router's DNS server and confirmed that they all point to the docker host.

I try to sign up at https://socio.my-base-domain/register. If I submit I get "Registration failed!!". Then I check https://socio.my-base-domain/admin/resources/user_activations, but there are no records.

@vaughngx4
Copy link
Contributor

I read this thread, especially #102 (comment). So I tried with vaughngx4 fork repo. I added the URLs mentioned in https://github.com/vaughngx4/Socioboard-5.0/blob/development/docker/nginx/ssl/SSL.README.md with my base domain to my router's DNS server and confirmed that they all point to the docker host.

I try to sign up at https://socio.my-base-domain/register. If I submit I get "Registration failed!!". Then I check https://socio.my-base-domain/admin/resources/user_activations, but there are no records.

This is probably a result of missing API info (Twilio is required).

However, I've since abandoned the project to lack of response from the developers and nothing working. See #399 .

@lmoellendorf
Copy link

Thank you. I added Twilio account information, but maybe not the expected IDs and Key. However, as you are the second one here who says that Socioboard does not work, I should better save my time and look for another solution - maybe yours.

@vaughngx4
Copy link
Contributor

@lmoellendorf OpenSMM is a work in progress. However you can use the version on the main branch to post to Twitter. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests