Docker Compose for Redmine + PostgreSQL

Redmine project management with PostgreSQL. Open-source issue tracking.

redmine project-management postgres
compose.yaml
services:
  redmine:
    image: redmine:latest
    ports:
      - target: 3000
        mode: ingress
    environment:
      - REDMINE_DB_POSTGRES=db
      - REDMINE_DB_DATABASE=redmine
      - REDMINE_DB_USERNAME=postgres
      - REDMINE_DB_PASSWORD=${REDMINE_DB_PASSWORD}
      - REDMINE_SECRET_KEY_BASE=${REDMINE_SECRET_KEY_BASE}
    healthcheck:
      test:
        - CMD
        - curl
        - -f
        - http://localhost:3000/
      interval: 30s
      timeout: 10s
      retries: 3
    depends_on:
      - db
    deploy:
      resources:
        reservations:
          cpus: "0.5"
          memory: 256M
    restart: unless-stopped
  db:
    image: postgres:16
    ports:
      - target: 5432
        mode: host
    environment:
      - POSTGRES_DB=redmine
      - POSTGRES_USER=postgres
      - POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
    healthcheck:
      test:
        - CMD-SHELL
        - pg_isready -U postgres
      interval: 10s
      timeout: 5s
      retries: 5
    deploy:
      resources:
        reservations:
          cpus: "0.5"
          memory: 256M
    restart: unless-stopped
    x-defang-postgres: true

Services

  • redmine redmine:latest
  • db postgres:16

Deploy

$ npx defang@latest compose up

Learn more about Defang