Taiga-front: Where to define URL?

Created on 15 Jan 2015  路  12Comments  路  Source: taigaio/taiga-front

I can't find any place to set our URL on the front end and it causes images to fail to load (avatars) and also makes the urls for git API hooks and such to display wrong.

The instructions say:

7.2. How can I change the domain name?

The domain name mainly affects the frontend application, because it needs to comunicate with the backend through the domain/public-ip.

To do this you should update the url value on frontend config file and rebuild frontend with gulp deploy. Also you should update the domain related configuration on the backend settings file: settings/local.py.

but that doesn't actually tell me where this setting is.

Most helpful comment

@teamcoltra Try this:

SITES["api"]["domain"] = "team.example.com"

All 12 comments

Hello @teamcoltra

The step 4.7 talks about how/where to create that configuration file

4.2. Final steps
Having installed all dependencies, only two steps remain: creating the configuration and compiling.

Create intial configuration on ~/taiga-front/conf/main.json
...

Anyway I've updated 7.2 to make it more clear.

Regards,

@superalex

{
"api": "http://example.com/api/v1/",
"eventsUrl": "ws://example.com/events",
"debug": "true",
"publicRegisterEnabled": true,
"feedbackEnabled": true,
"privacyPolicyUrl": null,
"termsOfServiceUrl": null,
"maxUploadFileSize": null,
"gitHubClientId": null
}

Do I just add "url": "example.com" to the bottom of that?

Sorry @teamcoltra I answered you about the settings from the front app for connecting to the back (API). You have an example of configuration for domain example.com in step 3.3 (http://taigaio.github.io/taiga-doc/dist/setup-production.html#_setup_python_environment) where it says:

Put this on ~/taiga-back/settings/local.py
...

After updating this file remember to update the server with the command "circusctl restart taiga
"

Regards

I don't want to be a pest @superalex - I have already followed that... all those settings are already at the proper URL.

MEDIA_URL = "/media/"
STATIC_URL = "static/"
ADMIN_MEDIA_PREFIX = "/static/admin/"
SITES["front"]["domain"] = "team.example.com"

DEBUG = True
TEMPLATE_DEBUG = True
PUBLIC_REGISTER_ENABLED = True

That is already set.

And accesing to http://team.example.com works for you?

@superalex Yes, but avatars show up as localhost:8000 which means they break, and the code it gives you for git webhooks shows localhost (which is fine because you can just change it, but still not great).

Any user who uploads their own avatar will get this as their avatar url http://localhost:8000/media/user/1/7/e/8/34e2e253647a856dd0be6b3cb7687ebb6eddca5132810a54cfeed7c4fc49/cloud.jpg.80x80_q85_crop.jpg

Our API payload URL http://localhost:8000/api/v1/gitlab-hook?project=1&key=300d418c173949cd9**

Your settings should be:

MEDIA_URL = "http://team.example.com/media/"
STATIC_URL = "http://team.example.com/static/"
ADMIN_MEDIA_PREFIX = "/static/admin/"
SITES["front"]["domain"] = "team.example.com"

If your avatars appear with that url it means that django (the taiga-back) didn't reload his configuration in settings.local

Are you sure django is restarting ok doing

circusctl restart taiga

What's the output of that command?

@teamcoltra Try this:

SITES["api"]["domain"] = "team.example.com"

@acl0056 Thank you! I was running into the same issue. The documentation of 7.1 seems to be out of sync with section 4.

I got the same issue, and can't solve it. It seems there is nothing more difficult than trying to get this right.

It is possible to add a prefix or context for access to Taiga.io and not directly the root "/"

For example: taigaio.domain.com/taiga

Thank you

Was this page helpful?
0 / 5 - 0 ratings

Related issues

george-viaud picture george-viaud  路  9Comments

metakermit picture metakermit  路  17Comments

geoah picture geoah  路  21Comments

jayvdb picture jayvdb  路  4Comments

emmanuelbuah picture emmanuelbuah  路  14Comments