community-catalog icon indicating copy to clipboard operation
community-catalog copied to clipboard

Taiga template is not working

Open galal-hussein opened this issue 8 years ago • 12 comments

Rancher Version: build-master:v0.20.0

Docker Version: 1.11.2

Catalog Template: Taiga template

Taiga template is giving error whenever i try to sign in or sign up:

taiga

The logs of the container:

postgresql:

6/24/2016 1:33:59 AMThe files belonging to this database system will be owned by user "postgres".
6/24/2016 1:33:59 AMThis user must also own the server process.
6/24/2016 1:33:59 AM
6/24/2016 1:33:59 AMThe database cluster will be initialized with locale "en_US.utf8".
6/24/2016 1:33:59 AMThe default database encoding has accordingly been set to "UTF8".
6/24/2016 1:33:59 AMThe default text search configuration will be set to "english".
6/24/2016 1:33:59 AM
6/24/2016 1:33:59 AMData page checksums are disabled.
6/24/2016 1:33:59 AM
6/24/2016 1:33:59 AMfixing permissions on existing directory /var/lib/postgresql/data ... ok
6/24/2016 1:33:59 AMcreating subdirectories ... ok
6/24/2016 1:33:59 AMselecting default max_connections ... 100
6/24/2016 1:33:59 AMselecting default shared_buffers ... 128MB
6/24/2016 1:33:59 AMselecting dynamic shared memory implementation ... posix
6/24/2016 1:34:00 AMcreating configuration files ... ok
6/24/2016 1:34:02 AMcreating template1 database in /var/lib/postgresql/data/base/1 ... ok
6/24/2016 1:34:02 AMinitializing pg_authid ... ok
6/24/2016 1:34:02 AMinitializing dependencies ... ok
6/24/2016 1:34:02 AMcreating system views ... ok
6/24/2016 1:34:03 AMloading system objects' descriptions ... ok
6/24/2016 1:34:03 AMcreating collations ... ok
6/24/2016 1:34:03 AMcreating conversions ... ok
6/24/2016 1:34:03 AMcreating dictionaries ... ok
6/24/2016 1:34:03 AMsetting privileges on built-in objects ... ok
6/24/2016 1:34:03 AMcreating information schema ... ok
6/24/2016 1:34:03 AMloading PL/pgSQL server-side language ... ok
6/24/2016 1:34:04 AMvacuuming database template1 ... ok
6/24/2016 1:34:04 AMcopying template1 to template0 ... ok
6/24/2016 1:34:04 AMcopying template1 to postgres ... ok
6/24/2016 1:34:04 AMsyncing data to disk ... ok
6/24/2016 1:34:04 AM
6/24/2016 1:34:04 AMWARNING: enabling "trust" authentication for local connections
6/24/2016 1:34:04 AMYou can change this by editing pg_hba.conf or using the option -A, or
6/24/2016 1:34:04 AM--auth-local and --auth-host, the next time you run initdb.
6/24/2016 1:34:04 AM
6/24/2016 1:34:04 AMSuccess. You can now start the database server using:
6/24/2016 1:34:04 AM
6/24/2016 1:34:04 AM    pg_ctl -D /var/lib/postgresql/data -l logfile start
6/24/2016 1:34:04 AM
6/24/2016 1:34:04 AM****************************************************
6/24/2016 1:34:04 AMWARNING: No password has been set for the database.
6/24/2016 1:34:04 AM         This will allow anyone with access to the
6/24/2016 1:34:04 AM         Postgres port to access your database. In
6/24/2016 1:34:04 AM         Docker's default configuration, this is
6/24/2016 1:34:04 AM         effectively any other container on the same
6/24/2016 1:34:04 AM         system.
6/24/2016 1:34:04 AM
6/24/2016 1:34:04 AM         Use "-e POSTGRES_PASSWORD=password" to set
6/24/2016 1:34:04 AM         it in "docker run".
6/24/2016 1:34:04 AM****************************************************
6/24/2016 1:34:04 AMwaiting for server to start....LOG:  database system was shut down at 2016-06-23 23:34:04 UTC
6/24/2016 1:34:04 AMLOG:  MultiXact member wraparound protections are now enabled
6/24/2016 1:34:04 AMLOG:  database system is ready to accept connections
6/24/2016 1:34:04 AMLOG:  autovacuum launcher started
6/24/2016 1:34:05 AM done
6/24/2016 1:34:05 AMserver started
6/24/2016 1:34:05 AMALTER ROLE
6/24/2016 1:34:05 AM
6/24/2016 1:34:05 AM
6/24/2016 1:34:05 AM/docker-entrypoint.sh: ignoring /docker-entrypoint-initdb.d/*
6/24/2016 1:34:05 AM
6/24/2016 1:34:05 AMLOG:  received fast shutdown request
6/24/2016 1:34:05 AMLOG:  aborting any active transactions
6/24/2016 1:34:05 AMLOG:  autovacuum launcher shutting down
6/24/2016 1:34:05 AMLOG:  shutting down
6/24/2016 1:34:05 AMwaiting for server to shut down....LOG:  database system is shut down
6/24/2016 1:34:06 AM done
6/24/2016 1:34:06 AMserver stopped
6/24/2016 1:34:06 AM
6/24/2016 1:34:06 AMPostgreSQL init process complete; ready for start up.
6/24/2016 1:34:06 AM
6/24/2016 1:34:06 AMLOG:  database system was shut down at 2016-06-23 23:34:05 UTC
6/24/2016 1:34:06 AMLOG:  MultiXact member wraparound protections are now enabled
6/24/2016 1:34:06 AMLOG:  database system is ready to accept connections
6/24/2016 1:34:06 AMLOG:  autovacuum launcher started

tiagback:

6/24/2016 1:34:04 AMTrying import local.py settings...
6/24/2016 1:34:04 AMWARNING: Using backend without django-transaction-hooks support, auto delete files will not work.
6/24/2016 1:34:05 AMTrying import local.py settings...
6/24/2016 1:34:05 AMWARNING: Using backend without django-transaction-hooks support, auto delete files will not work.

galal-hussein avatar Jun 23 '16 23:06 galal-hussein

Exactly, the template has several errors :

  • the postgres database has no password and crash
  • the taiga init script is not launched and, in this case, the database is not initialized

throrin19 avatar Jun 27 '16 06:06 throrin19

Hi, I taiga-docker setup is kinda tricky, at least imho - especially if you want to have full setup with events part and for example some plugins where you have to adjust back&front - we ended up with custom docker-compose script based on few available solutions. It's not really sharable in current form and I doubt it will ever be, but I would suggest just customizing it for you needs - it takes some time to dive into taiga itself, but it's totally worth it - it's an awesome piece of software <3.

I'm aware that this comment is not very useful, but I just wanted to say that templating taiga in some cases might be not even possible /shrug

rwojsznis avatar Jul 04 '16 17:07 rwojsznis

I'm trying to fix this #242 pls take a look

KartoffelToby avatar Aug 06 '16 15:08 KartoffelToby

@KartoffelToby I am still having the same problem, also when i try to access the service over HTTP i am being redirected to Location: https://_/

galal-hussein avatar Dec 02 '16 18:12 galal-hussein

:+1:

johackim avatar Dec 06 '16 10:12 johackim

@galal-hussein

Is it the exact same error? over https it should work

http isn't working at all you're right, i'm sorry i'm prefere only the https way, but i will change the configuration to switch between https and http in rancher.

KartoffelToby avatar Dec 06 '16 11:12 KartoffelToby

Getting the same https://_ redirect issue. Using an nginx proxy, Tried proxying both https and http from taiga to nginx, nginx is serving https with the valid certificate.

jslay88 avatar Mar 06 '17 16:03 jslay88

Have you found the solution for the https://_ redirection issue?

mikaoelitiana avatar Mar 15 '17 07:03 mikaoelitiana

Never found a reliable solution to having taiga behind a proxy. I spent a solid day trying to get it working with all sorts of nginx params and header forwarding. Had to eventually use a different docker image and forward 80 and 443 to taiga. Even then, was still having issues with certain things (like the admin panel) not working correctly or having the CSS broken.

Eventually realized, after updating Gitlab, that it has a Kanban style board available, and it serves my purpose. I have since dropped trying to get taiga working in a production type environment.

jslay88 avatar Mar 16 '17 05:03 jslay88

I solved the https://_ redirection issue by opening the port 443 in the taiga service

kilmarnock avatar Mar 20 '17 15:03 kilmarnock

Temporary fix for http

  1. Set environment variable TAIGA_SSL to False
  2. Create default.conf anywhere you want
server {
    listen 80 default_server;
    server_name _;

    large_client_header_buffers 4 32k;
    client_max_body_size 50M;
    charset utf-8;
	
    index index.html;

    # Frontend
    location / {
        root /usr/src/taiga-front-dist/dist/;
        try_files $uri $uri/ /index.html;
    }

    # Backend
    location /api {
        proxy_set_header Host $http_host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Scheme $scheme;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_pass http://127.0.0.1:8000/api;
        proxy_redirect off;
    }

    # Django admin access (/admin/)
    location /admin {
        proxy_set_header Host $http_host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Scheme $scheme;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_pass http://127.0.0.1:8000$request_uri;
        proxy_redirect off;
    }

    # Static files
    location /static {
        alias /usr/src/taiga-back/static;
    }

    # Media files
    location /media {
        alias /usr/src/taiga-back/media;
    }

    # Events
    location /events {
       proxy_pass http://events:8888/events;
       proxy_http_version 1.1;
       proxy_set_header Upgrade $http_upgrade;
       proxy_set_header Connection "upgrade";
       proxy_connect_timeout 7d;
       proxy_send_timeout 7d;
       proxy_read_timeout 7d;
    }
}
  1. Create conf.json anywhere you want
{
    "api": "http://change.this.to.your.domain.or.ip/api/v1/",
    "eventsUrl": "ws://change.this.to.your.domain.or.ip/events",
    "debug": false,
    "debugInfo": false,
    "defaultLanguage": "en",
    "publicRegisterEnabled": false,
    "feedbackEnabled": false,
    "privacyPolicyUrl": null,
    "termsOfServiceUrl": null,
    "maxUploadFileSize": null,
    "contribPlugins": ["/plugins/slack/slack.json"]
}
  1. Add 2 volumes path/to/your/default.conf:/etc/nginx/conf.d/default.conf path/to/your/conf.json:/usr/src/taiga-front-dist/dist/conf.json

Enjoy

PCXDME avatar May 14 '17 17:05 PCXDME

After opening a public port to map to 443, I get this error:

screenshot from 2017-06-16 19-38-36

yonas avatar Jun 16 '17 23:06 yonas