discourse一个docker-compose 配置

bitnami 提供的一个docker-compose 运行文件,还是很方便的,直接可以拿来使用

docker-compose 文件

version: '2'
services:
  postgresql:
    image: 'docker.io/bitnami/postgresql:11-debian-10'
    environment:
      - ALLOW_EMPTY_PASSWORD=yes
    volumes:
      - 'postgresql_data:/bitnami/postgresql'
  redis:
    image: 'docker.io/bitnami/redis:6.0-debian-10'
    environment:
      - ALLOW_EMPTY_PASSWORD=yes
    volumes:
      - 'redis_data:/bitnami'
  discourse:
    image: 'docker.io/bitnami/discourse:2-debian-10'
    ports:
      - '80:3000'
    depends_on:
      - postgresql
      - redis
    volumes:
      - 'discourse_data:/bitnami'
    environment:
      - POSTGRESQL_HOST=postgresql
      - POSTGRESQL_ROOT_USER=postgres
      - POSTGRESQL_CLIENT_CREATE_DATABASE_NAME=bitnami_application
      - POSTGRESQL_CLIENT_CREATE_DATABASE_USERNAME=bn_discourse
      - POSTGRESQL_CLIENT_CREATE_DATABASE_PASSWORD=bitnami1
      - DISCOURSE_POSTGRESQL_NAME=bitnami_application
      - DISCOURSE_POSTGRESQL_USERNAME=bn_discourse
      - DISCOURSE_POSTGRESQL_PASSWORD=bitnami1
      - DISCOURSE_HOSTNAME=www.example.com
  sidekiq:
    image: 'docker.io/bitnami/discourse:2-debian-10'
    depends_on:
      - discourse
    volumes:
      - 'discourse_data:/bitnami'
    command: 'nami start --foreground discourse-sidekiq'
    environment:
      - DISCOURSE_POSTGRESQL_NAME=bitnami_application
      - DISCOURSE_POSTGRESQL_USERNAME=bn_discourse
      - DISCOURSE_POSTGRESQL_PASSWORD=bitnami1
      - DISCOURSE_HOST=discourse
      - DISCOURSE_PORT=3000
      - DISCOURSE_HOSTNAME=www.example.com
volumes:
  postgresql_data:
    driver: local
  redis_data:
    driver: local
  discourse_data:
    driver: local

参考资料

https://github.com/bitnami/bitnami-docker-discourse/blob/master/docker-compose.yml

posted on 2021-02-15 12:01  荣锋亮  阅读(382)  评论(0编辑  收藏  举报

导航