Public | Automated Build

Last pushed: a year ago
Short Description
[NOT MAINTAINED] Docker image for Taiga Backend. Works together with htdvisser/taiga-front-dist.
Full Description

htdvisser/taiga-back

Taiga is a project management platform for startups and agile developers & designers who want a simple, beautiful tool that makes work truly enjoyable.

This Docker image can be used for running the Taiga backend. It works together with the htdvisser/taiga-front-dist image.



Running

A postgres container should be linked to the taiga-back container. The taiga-back container will use the POSTGRES_USER and POSTGRES_PASSWORD environment variables that are supplied to the postgres container.

docker run --name taiga_back_container_name --link postgres_container_name:postgres htdvisser/taiga-back

Docker-compose

For a complete taiga installation (htdvisser/taiga-back and htdvisser/taiga-front-dist) you can use this docker-compose configuration:

data:
  image: tianon/true
  volumes:
    - /var/lib/postgresql/data
    - /usr/local/taiga/media
    - /usr/local/taiga/static
    - /usr/local/taiga/logs
db:
  image: postgres
  environment:
    POSTGRES_USER: taiga
    POSTGRES_PASSWORD: password
  volumes_from:
    - data
taigaback:
  image: htdvisser/taiga-back:stable
  hostname: dev.example.com
  environment:
    SECRET_KEY: examplesecretkey
    EMAIL_USE_TLS: True
    EMAIL_HOST: smtp.gmail.com
    EMAIL_PORT: 587
    EMAIL_HOST_USER: youremail@gmail.com
    EMAIL_HOST_PASSWORD: yourpassword
  links:
    - db:postgres
  volumes_from:
    - data
taigafront:
  image: htdvisser/taiga-front-dist:stable
  hostname: dev.example.com
  links:
    - taigaback
  volumes_from:
    - data
  ports:
    - 0.0.0.0:80:80

Database Initialization

To initialize the database, use docker exec -it taiga-back bash and execute the following commands:

cd /usr/local/taiga/taiga-back/
python manage.py loaddata initial_user
python manage.py loaddata initial_project_templates
python manage.py loaddata initial_role

Environment

  • SECRET_KEY defaults to "insecurekey", but you might want to change this.
  • DEBUG defaults to False
  • TEMPLATE_DEBUG defaults to False
  • PUBLIC_REGISTER_ENABLED defaults to True

URLs for static files and media files from taiga-back:

  • MEDIA_URL defaults to "http://$HOSTNAME/media/"
  • STATIC_URL defaults to "http://$HOSTNAME/static/"

Domain configuration:

  • API_SCHEME defaults to "http". Use https if htdvisser/taiga-front-dist is used and SSL enabled.
  • API_DOMAIN defaults to "$HOSTNAME"
  • API_NAME defaults to "api"
  • FRONT_SCHEME defaults to "http". Use https if htdvisser/taiga-front-dist is used and SSL enabled.
  • FRONT_DOMAIN defaults to "$HOSTNAME"
  • FRONT_NAME defaults to "front"

Email configuration:

  • EMAIL_USE_TLS defaults to False
  • EMAIL_HOST defaults to "localhost"
  • EMAIL_PORT defaults to "25"
  • EMAIL_HOST_USER defaults to ""
  • EMAIL_HOST_PASSWORD defaults to ""
  • DEFAULT_FROM_EMAIL defaults to "no-reply@example.com"

Database configuration:

  • POSTGRES_DB_NAME. Use to override database name.
  • POSTGRES_USER. Use to override user specified in linked postgres container.
  • POSTGRES_PASSWORD. Use to override password specified in linked postgres container.
Docker Pull Command
Owner
htdvisser
Source Repository

Comments (19)
nerka
6 months ago

@zjlallen @modusanitas @zhangwu1992
i had it working by adding some postgres env var.
here is my yml. Hope it will help you :

version: "3"
services:
  db:
    image: postgres
    environment:
      POSTGRES_USER: taiga
      POSTGRES_PASSWORD: password
    volumes:
      - /home/docker/taiga/data:/var/lib/postgresql/data
  taigaback:
    image: htdvisser/taiga-back:stable
    hostname: dev.example.com
    environment:
      - POSTGRES_DB_NAME=taiga
      - POSTGRES_USER=taiga
      - POSTGRES_PASSWORD=password
      - POSTGRES_HOST=postgres
      - POSTGRES_PORT=5432
      - SECRET_KEY=examplesecretkey
      - EMAIL_USE_TLS=True
      - EMAIL_HOST=smtp.gmail.com
      - EMAIL_PORT=587
      - EMAIL_HOST_USER=youremail@gmail.com
      - EMAIL_HOST_PASSWORD=yourpassword
    links:
      - db:postgres
    volumes:
      - /home/docker/taiga/media:/usr/local/taiga/media
      - /home/docker/taiga/static:/usr/local/taiga/static
      - /home/docker/taiga/logs:/usr/local/taiga/logs
  taigafront:
    image: htdvisser/taiga-front-dist:stable
    hostname: dev.example.com
    links:
      - taigaback
    ports:
      - 8056:80
    environment:
      - TAIGABACK_PORT_8000_TCP_ADDR=taigaback
zhangwu1992
9 months ago

@zjlallen @modusanitas same for me.........

zjlallen
9 months ago

@modusanitas same for me.

vanufryiuk
10 months ago

JFYI. You can set POSTGRES_PORT and POSTGRES_HOST as well.

wlbr
10 months ago

@modusanitas same for me.
postgres is running when i do a docker run -p 5432:5432 postgres, but it does not seem to run after docker_compose up.

vorontsovie
10 months ago

modusanitas, It looks that taigaback can't get postgresql. Is your postgres image up and running? Didn't you change links names?

modusanitas
10 months ago

Running docker-compose up results in this error:

taigaback_1 | tcp://172.17.0.3:5432: forward host lookup failed: Unknown host

Can anybody tell me what Im doing wrong?
I believe I followed all the instructions.

naonak
a year ago

Hello,

I try to use docker compose file v2 but it failed. Can you help me ?

I tried with this file :

version: "2"
services:
  data:
    tty: true
    image: busybox:latest
    volumes:
    - /usr/local/taiga/logs
    - /usr/local/taiga/media
    - /usr/local/taiga/static
    - /var/lib/postgresql/data
    stdin_open: true
  postgres:
    image: postgres
    environment:
      - POSTGRES_USER=taiga
      - POSTGRES_PASSWORD=xxxxx
    volumes_from:
    - data
    networks:
      internal:
        aliases:
         - db
  taigafront:
    image: htdvisser/taiga-front-dist
    hostname: taigatest
    domainname: taiga.domain.fr:5080
    environment:
      - PUBLIC_REGISTER_ENABLED=0
    volumes_from:
    - data
    ports:
      - 5080:80/tcp
    links:
      - taigaback
    networks:
      internal:
  taigaback:
    image: htdvisser/taiga-back
    hostname: taigatest
    domainname: taiga.domain.fr:5080
    environment:
      - POSTGRES_USER=taiga
      - POSTGRES_PASSWORD=xxxxx
      - SECRET_KEY=xxxxx
      - EMAIL_USE_TLS=0
      - EMAIL_HOST=smtp.gmail.com
      - EMAIL_PORT=587
      - EMAIL_HOST_USER=fxxxin@gmail.com
      - EMAIL_HOST_PASSWORD=xxxx
      - PUBLIC_REGISTER_ENABLED=0
    volumes_from:
    - data
    links:
      - postgres
    networks:
      - internal
networks:
  internal:

Error logs :

taigafront_1 | 2016/11/01 08:58:15 [emerg] 14#0: no host in upstream ":8000" in /etc/nginx/upstream.conf:3
taiga_postgres_1 exited with code 1
taigafront_1 | nginx: [emerg] no host in upstream ":8000" in /etc/nginx/upstream.conf:3
taigaback_1 | no port[s] to connect to
taiga_taigafront_1 exited with code 1
taigaback_1 | no port[s] to connect to
taigaback_1 | no port[s] to connect to
pascalbod
2 years ago

@toosman: you have to specify a host path for every volume you'd like to be persistent. For instance:

volumes:
  - /path/on/my/host:/var/lib/postgresql/data

For more information, you can check this link.

toosman
2 years ago

Hello,
I'm testing taiga and i have used your images for that. I'm not very familiar with docker so please have forgivness if i have missed something important here.

If i use your docker-compose file, i thought that the data container would be persistent even if i tear the setup down with "#docker-compose down" and start it again but that doesn't work for me. When i start the container again everything is lost and i have to run the database setup script. What can i be doing wrong here? I'm using the script exactly as you have posted it in the description on this page.