riotkit-org / docker-taiga

Production-ready docker container for Taiga https://taiga.io
https://quay.io/repository/riotkit/taiga?tab=tags
GNU General Public License v3.0
55 stars 8 forks source link

Making `make start` work with existing database #24

Closed Torxed closed 4 years ago

Torxed commented 4 years ago

docker-compose.yaml

version: '2'

volumes:
    media:

services:
    taiga:
        image: quay.io/riotkit/taiga:${VERSION}
        environment:
            POSTGRES_DB: ${TAIGA_DB_NAME}
            POSTGRES_PASSWORD: ${TAIGA_DB_PASSWORD}
            POSTGRES_USER: ${TAIGA_DB_USER}
        extra_hosts:
            - "database:172.19.0.1"
        ports:
            - 127.0.0.1:80:80
        volumes:
            # all data placed in volumes are kept between container updates/deletion/recreation
            - media:/usr/src/taiga-back/media
        env_file:
            - .env

Only change really in .env would be:

TAIGA_DB_HOST=database
Torxed commented 4 years ago

Never really worked with docker, so would be neat if there were an example for this on record, would make it a lot easier to get up and running. Cheers for forking a otherwise dead project btw.

blackandred commented 4 years ago

Hi, is this a problem or a solution?

Torxed commented 4 years ago

Hi, is this a problem or a solution?

It's a solution, or a minimal example of how to run taiga with a already existing postgresql server (external) and exposing that host to the docker container. I just lacked this example when I got started, and thought I'd share what other beginners with docker could use if they only want to run the taiga in a docker, not the whole solution :)

blackandred commented 4 years ago

Thanks, I will add it to FAQ then.

blackandred commented 4 years ago

Added, thank you.