taiga-docker

repository·main·Indexed 24 days ago

https://github.com/taigaio/taiga-docker

Containerized deployment of the Taiga project management platform using Docker Compose. Includes guides for environment-based configuration via .env files, managing services with taiga-manage.sh, and setting up PostgreSQL, RabbitMQ, and Nginx proxies for subdomain or subpath deployments. Covers integration with GitHub, GitLab, Slack, and importers for Jira and Trello.

Tokens
4.7K
Snippets
23
Records
29
Agent score
30%

What's inside taiga-docker

  1. Configure Django Admin for HTTP

    main

    Taiga is configured to work behind HTTPS by default. If you are using HTTP, you must disable secure session and CSRF cookies to access the Django Admin (/admin/).

    # Add to &default-back-environment
    SESSION_COOKIE_SECURE: "False"
    CSRF_COOKIE_SECURE: "False"
  2. Enable GitLab OAuth Login

    main

    To allow users to log in via GitLab, obtain a client ID and secret from GitLab as an OAuth 2.0 provider.

    Note:

    • Use 'True' for the backend and 'true' for the frontend.
    • GITLAB_API_CLIENT_ID (backend) and GITLAB_CLIENT_ID (frontend) must have the same value as GITLAB_URL.
    • Public registration must be enabled for OAuth buttons to appear.
    # Add to &default-back-environment
    ENABLE_GITLAB_AUTH: "True"
    GITLAB_API_CLIENT_ID: "gitlab-client-id"
    GITLAB_API_CLIENT_SECRET: "gitlab-client-secret"
    GITLAB_URL: "gitlab-url"
    PUBLIC_REGISTER_ENABLED: "True"
    
    # Add to taiga-front service
    ENABLE_GITLAB_AUTH: "true"
    GITLAB_CLIENT_ID: "gitlab-client-id"
    GITLAB_URL: "gitlab-url"
    PUBLIC_REGISTER_ENABLED: "true"
  3. Start the Taiga application

    main

    To deploy Taiga using Docker and Docker Compose, use the provided launch script. Ensure you have Docker version 19.03.0+ installed. Use the stable branch for production deployments and the main branch for development.

    1. Launch the application:
      ./launch-taiga.sh
    2. Once the application is running, create a superuser to access the administration interface:
      ./taiga-manage.sh createsuperuser

    By default, if running locally, the application is accessible at http://localhost:9000.

    $ ./launch-taiga.sh
    
    $ ./taiga-manage.sh createsuperuser
  4. Enable Jira Importer

    main

    To allow importing projects from Jira, obtain the consumer key and the public/private certificate keys via OAuth 1.0a.

    Note: Use 'True' for the backend and 'true' for the frontend.

    # Add to &default-back-environment
    ENABLE_JIRA_IMPORTER: "True"
    JIRA_IMPORTER_CONSUMER_KEY: "consumer-key-from-jira"
    JIRA_IMPORTER_CERT: "cert-from-jira"
    JIRA_IMPORTER_PUB_CERT: "pub-cert-from-jira"
    
    # Add to taiga-front service
    ENABLE_JIRA_IMPORTER: "true"
  5. Handle Taiga deployment changes between subdomain and subpath

    main

    When switching Taiga's deployment mode between a subdomain (e.g., https://taiga.mycompany.com) and a subpath (e.g., http://mycompany.com/subpath), you must perform two steps to ensure a smooth transition for users:

    1. Adjust the Taiga configuration to reflect the new URL structure.
    2. Change the TAIGA_SECRET_KEY to ensure that user session refreshes work correctly for the end user during the transition.
  6. Advanced Configuration: Map config.py for taiga-back

    main

    If you need to bypass docker-compose.yml environment variables for deep configuration (e.g., custom database settings, email credentials, or secret keys), you must map a custom config.py file to /taiga-back/settings/config.py in both docker-compose.yml and docker-compose-inits.yml.

    1. Download settings/config.py.prod.example from the taiga-back repository.
    2. Rename it to config.py.
    3. Edit the file (ensure the Taiga secret key matches taiga-events and taiga-protected).
    4. Map it in your compose files.
  7. Create an Admin User

    main

    After starting the services, use the following command to create a superuser for the Taiga instance:

    $ docker compose up -d
    
    $ docker compose -f docker-compose.yml -f docker-compose-inits.yml run --rm taiga-manage createsuperuser
  8. Enable GitHub OAuth Login

    main

    To allow users to log in via GitHub, you must create an OAuth App in GitHub and provide the credentials to both the backend and frontend.

    Note:

    • Use 'True' for the backend and 'true' for the frontend.
    • GITHUB_API_CLIENT_ID (backend) and GITHUB_CLIENT_ID (frontend) must have the same value.
    • Public registration must be enabled for OAuth buttons to appear.
    # Add to &default-back-environment
    ENABLE_GITHUB_AUTH: "True"
    GITHUB_API_CLIENT_ID: "github-client-id"
    GITHUB_API_CLIENT_SECRET: "github-client-secret"
    PUBLIC_REGISTER_ENABLED: "True"
    
    # Add to taiga-front service
    ENABLE_GITHUB_AUTH: "true"
    GITHUB_CLIENT_ID: "github-client-id"
    PUBLIC_REGISTER_ENABLED: "true"
  9. Advanced Configuration: Map conf.json for taiga-front

    main

    To configure frontend-specific settings like api URLs or baseHref (especially for subpath deployments), map a custom conf.json file to /taiga-front/dist/conf.json.

    1. Download dist/conf.example.json from the taiga-front repository.
    2. Rename it to conf.json.
    3. Edit the file with your specific URLs.
    4. Map it in your compose files.
  10. Enable Public Registration

    main

    By default, public registration is disabled. To allow users to register themselves, you must enable it in both the backend and the frontend.

    Important: The boolean values are case-sensitive. Use 'True' (capital T) for the backend and 'true' (lowercase t) for the frontend.

  11. Configure Nginx Proxy for Subdomain or Subpath

    main

    Taiga requires a proxy to point to http://localhost:9000. Below are Nginx configuration templates for both subdomain and subpath deployments.

    Note: Both configurations include a specific location /events block to handle WebSocket connections for Taiga events.

    ### Subdomain Example
    server {
        server_name taiga.mycompany.com;
    
        location / {
            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_redirect off;
            proxy_pass http://localhost:9000/;
        }
    
        # Events
        location /events {
            proxy_pass http://localhost:9000/events;
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection "upgrade";
            proxy_set_header Host $host;
            proxy_connect_timeout 7d;
            proxy_send_timeout 7d;
            proxy_read_timeout 7d;
        }
    }
    
    ### Subpath Example
    server {
      server_name mycompany.com;
    
      location /taiga/ {
        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_redirect off;
        proxy_pass http://localhost:9000/;
      }
    
      # Events
      location /taiga/events {
        proxy_pass http://localhost:9000/taiga/events;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Host $host;
        proxy_connect_timeout 7d;
        proxy_send_timeout 7d;
        proxy_read_timeout 7d;
      }
    }