Create a testing server

Create a testing server to try out new changes. Perhaps we should also add a sandbox mode to allow Devs to code without needing to set up a local host?

This would make it far easier for developers to contribute to the project and so the code would improve its ability to help the worlds most at need much faster than it currently can. That would be to deploy a new instance as a development server all the devs can test out and discuss new improvements on, and then to tell the any live sites to monitor the development server for new completed versions.

Any strong opinions on which domain to put the testing servers? It could be something like app.staging.publichappinessmovement.com & discourse.staging.publichappinessmovement.com, or for full separation it could be on a completely separate domain (this would be my recommendation).

1 Like

lets go with your recommendation.

what about development.focallocal.org (our old domain which still gets a lot of traffic).

iā€™m not sure the reasons behind why its better on a different domain and whether using our old one is a good idea or not. Focallocal.org will redirect to Publichappinessmovement.com as soon as i get someone to move our wordpress community news site away from there. Its not really used much now so its quite low on the to do list.

Or if its easier as you already have the keys to the server, just Dev.Publichappinessmovement.com as the plan is that this site will always be the Meta for those building on the codebase. Iā€™ll be back online in an hour. Got to walk the dog.

Having it on a totally separate domain gets rid of the chance of having clashes between cookies for either site, and also means you have to worry less about security bugs on the testing server (as they canā€™t impact the main site).

The way Iā€™ve done this on another project is registered a new free domain - .ga, .ml, .cf, and .gq are all free. So you could grab something like phm-testing.ga on Freenom and away we go.

Would the map on the testing site have a different MongoDB database to the other two sites, or would it also use the same one?

1 Like

Ok, that makes a lot of sense thank you for explaining it.

Iā€™ll grab something now. Databasesā€¦ hmm. I guess that would mean any bug that occurred we could test live without needing to try to recreate the error, but then we would have to be a bit cautious letting people create test posts as theyā€™d go live on the main site too.

Probably a fresh database would be simplest.

It looks like mup can create a mongodb database for us, so that might make life simpler for the testing server. Did you grab a domain? Once itā€™s configured to be managed by CloudFlare I can take it from there and set up Discourse and the map.

1 Like

@AndyatFocallocal this is the domain post :slight_smile:

It sounds like a great plan. Do we need to worry about this: https://www.reddit.com/r/Affiliatemarketing/comments/2xt38g/can_free_domainnames_like_cf_tk_gq_ml_ga_be_used/

Also the ones i found were only free for a year. Do you want to go ahead and grab one?

Ideally longer than a year so we donā€™t have to reconfigure, but if thatā€™s all which is available then go for it. Something like ā€˜testing.happinessā€™, it doensā€™t really matter too much

oh, and good news. i found someone to join the team and (fingers crossed) get the React tasks complete this weekend.

I donā€™t think those are concerns we need to worry about. Iā€™m not sure what theyā€™re saying is accurate, but even if it was, this is a testing server so it doesnā€™t really matter. Can always spin up a new domain if there are issues.

I grabbed testing-happiness.ga :slight_smile:

1 Like

sounds great. iā€™ve got two other projects also interested in running something on our codebase, which will add more devs and energy into the mix, so we could be putting up another 2 branches very soon.

Long term thinking weā€™re going to want it to be as easy as possible for 100 or more projects to be running their own instance, and then push all approved updates out at roughly a monthly interval.

Btw, should we make PRs to unit testing environment, unified deployment, or another branch. a simple diagram would be a pretty cool way to explain it. or just the details for one and i can ask the graphic design team to knock one up

Iā€™ve created testing servers.

fl-maps: http://fl-maps.testing-happiness.ga/

Discourse: https://testing-happiness.ga/

@AndyatFocallocal could you finish configuring the Discourse instance and make sure everything looks alright?

Sure thing. Thatā€™s awesome. So we make all commits to the testing branch and then move them all over together to any live branches?

@Zahra is making commits now so it would be great if they did it following your new system

Yeah, the idea in short is that people would merge changes to master, and once you want to deploy those changes you will update the deploy branches accordingly. Iā€™ll spell that out more once we have the master branch in good shape.

ok, so right now the changes should go directly to the two live branches?

@syl iā€™m getting an error message iā€™ve not seen before during the testing server setup.

ā€˜sylque:accounts-discourse error: service not found or invalid service settings. Did you properly initialize the package?ā€™

you can see it here: https://testing-happiness.ga/

any idea what the error could be?

I was writing up some documentation so you can also see if i missed a step: Setting up Discourse via the admin section after launching a new site

Yes, you forgot to document the required settings enable sso provider and sso provider secrets.

Remember, in the new setup:

  • you use Discourse as the source of user accounts (in other words, you use Discourse as a ā€œSSO providerā€), and
  • in your web app, you use the sylque:accounts-discourse package to connect your web app to Discourse accounts.

I donā€™t see the error, I guess you fixed it in the meantime.

The error means you didnā€™t initialize your web app so that it connects to Discourse SSO correctly. You need to follow the doc here.

1 Like

thank you @syl. @zofrex can you see any settings you might have missed in the set up in the link Sylvain provided?

Iā€™ve checked through the settings in Disocurse and used the same SSO settings as in BTM, which i think is correct.

@syl the error message only occurs when i login to the platform