public:docker:app:redmine

docker 部署 redmine

docker-compose.yml
version: "3.7"

services:

  redmine:
    image: redmine:5
    restart: always
    ports:
      - "3000:3000"
    volumes:
      - redmine_files:/usr/src/redmine/files
    environment:
      - TZ=Asia/Shanghai
      - REDMINE_DB_POSTGRES=db
      - REDMINE_DB_PORT=5432
      - REDMINE_DB_USERNAME=redmine
      - REDMINE_DB_PASSWORD=redmine
      - REDMINE_DB_DATABASE=redmine
    depends_on:
      - db
    healthcheck:
      test: ["CMD-SHELL", "curl -f http://127.0.0.1:3000 || exit 1"]
      interval: 2m
      timeout: 10s
      retries: 3

  db:
    image: postgres:alpine
    restart: always
    volumes:
      - db_data:/var/lib/postgresql/data
      # - ./init.sql:/docker-entrypoint-initdb.d/init.sql
    # ports:
    #   - "5432:5432"
    # env_file:
    #   - .env
    environment:
      # default user name: postgres
      - POSTGRES_USER=redmine
      - POSTGRES_PASSWORD=redmine
      - POSTGRES_DB=redmine
      - TZ=Asia/Shanghai
    healthcheck:
      test: ["CMD-SHELL", "pg_isready -U postgres"]
      interval: 2m
      timeout: 5s
      retries: 5
      start_period: 1m
 
  #adminer:
  #  image: adminer
  #  restart: always
  #  ports:
  #    - "8080:8080"

volumes:
  redmine_files:
  db_data:

db 相关的配置参考 docker 部署 postgresql

  • 最后更改: 2023/08/15 01:11
  • 由 Jinkin Liu