docker-compose.yml
```yaml
version: '3'
services:
postgresql:
image: bitnami/postgresql:15
volumes:
- './postgresql_data:/bitnami/postgresql'
- '/etc/localtime:/etc/localtime:ro'
environment:
- ALLOW_EMPTY_PASSWORD=yes
- POSTGRESQL_USERNAME=bn_discourse
- POSTGRESQL_DATABASE=bitnami_discourse
redis:
image: bitnami/redis:7.0
environment:
- ALLOW_EMPTY_PASSWORD=yes
volumes:
- '/etc/localtime:/etc/localtime:ro'
discourse:
image: bitnami/discourse:latest
ports:
- '3000:3000'
volumes:
- './discourse_data:/bitnami/discourse'
- '/opt/backup/discourse:/bitnami/discourse/public/backups'
- '/etc/localtime:/etc/localtime:ro'
depends_on:
- postgresql
environment:
- ALLOW_EMPTY_PASSWORD=yes
- DISCOURSE_HOST=[redacted]
- DISCOURSE_DATABASE_HOST=postgresql
- DISCOURSE_DATABASE_PORT_NUMBER=5432
- DISCOURSE_DATABASE_USER=bn_discourse
- DISCOURSE_DATABASE_NAME=bitnami_discourse
- DISCOURSE_REDIS_HOST=redis
- DISCOURSE_REDIS_PORT_NUMBER=6379
- POSTGRESQL_CLIENT_POSTGRES_USER=postgres
- POSTGRESQL_CLIENT_CREATE_DATABASE_NAME=bitnami_discourse
- POSTGRESQL_CLIENT_CREATE_DATABASE_EXTENSIONS=hstore,pg_trgm
- DISCOURSE_EMAIL=[redacted]
- DISCOURSE_SMTP_HOST=[redacted]
- DISCOURSE_SMTP_PORT=587
- DISCOURSE_SMTP_USER=[redacted]
- DISCOURSE_SMTP_PASSWORD=[redacted]
- DISCOURSE_SMTP_PROTOCOL=tls
sidekiq:
image: bitnami/discourse:latest
depends_on:
- discourse
volumes:
- './discourse_data:/bitnami/discourse'
- '/opt/backup/discourse:/bitnami/discourse/public/backups'
- '/etc/localtime:/etc/localtime:ro'
command: /opt/bitnami/scripts/discourse-sidekiq/
run.sh environment:
- ALLOW_EMPTY_PASSWORD=yes
- DISCOURSE_HOST=[redacted]
- DISCOURSE_DATABASE_HOST=postgresql
- DISCOURSE_DATABASE_PORT_NUMBER=5432
- DISCOURSE_DATABASE_USER=bn_discourse
- DISCOURSE_DATABASE_NAME=bitnami_discourse
- DISCOURSE_REDIS_HOST=redis
- DISCOURSE_REDIS_PORT_NUMBER=6379
- DISCOURSE_EMAIL=[redacted]
- DISCOURSE_SMTP_HOST=[redacted]
- DISCOURSE_SMTP_PORT=587
- DISCOURSE_SMTP_USER=[redacted]
- DISCOURSE_SMTP_PASSWORD=[redacted]
- DISCOURSE_SMTP_PROTOCOL=tls
```
可以试试这样的部署