Include full contents of all nested repositories
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
239
letsbe-ansible-runner/stacks/chatwoot/.env
Normal file
239
letsbe-ansible-runner/stacks/chatwoot/.env
Normal file
@@ -0,0 +1,239 @@
|
||||
SECRET_KEY_BASE={{ chatwoot_secret_key_base }}
|
||||
|
||||
# Replace with the URL you are planning to use for your app
|
||||
FRONTEND_URL=https://{{ domain_chatwoot }}
|
||||
# To use a dedicated URL for help center pages
|
||||
HELPCENTER_URL=https://{{ domain_chatwoot_helpdesk }}
|
||||
|
||||
# If the variable is set, all non-authenticated pages would fallback to the default locale.
|
||||
# Whenever a new account is created, the default language will be DEFAULT_LOCALE instead of en
|
||||
# DEFAULT_LOCALE=en
|
||||
|
||||
# If you plan to use CDN for your assets, set Asset CDN Host
|
||||
ASSET_CDN_HOST=
|
||||
|
||||
# Force all access to the app over SSL, default is set to false
|
||||
FORCE_SSL=false
|
||||
|
||||
# This lets you control new sign ups on your chatwoot installation
|
||||
# true : default option, allows sign ups
|
||||
# false : disables all the end points related to sign ups
|
||||
# api_only: disables the UI for signup, but you can create sign ups via the account apis
|
||||
ENABLE_ACCOUNT_SIGNUP=false
|
||||
|
||||
# Redis config
|
||||
REDIS_URL=redis://:{{ chatwoot_redis_password }}@redis:6379
|
||||
# If you are using docker-compose, set this variable's value to be any string,
|
||||
# which will be the password for the redis service running inside the docker-compose
|
||||
# to make it secure
|
||||
REDIS_PASSWORD={{ chatwoot_redis_password }}
|
||||
# Redis Sentinel can be used by passing list of sentinel host and ports e,g. sentinel_host1:port1,sentinel_host2:port2
|
||||
REDIS_SENTINELS=
|
||||
# Redis sentinel master name is required when using sentinel, default value is "mymaster".
|
||||
# You can find list of master using "SENTINEL masters" command
|
||||
REDIS_SENTINEL_MASTER_NAME=
|
||||
|
||||
# By default Chatwoot will pass REDIS_PASSWORD as the password value for sentinels
|
||||
# Use the following environment variable to customize passwords for sentinels.
|
||||
# Use empty string if sentinels are configured with out passwords
|
||||
# REDIS_SENTINEL_PASSWORD=
|
||||
|
||||
# Redis premium breakage in heroku fix
|
||||
# enable the following configuration
|
||||
# ref: https://github.com/chatwoot/chatwoot/issues/2420
|
||||
# REDIS_OPENSSL_VERIFY_MODE=none
|
||||
|
||||
# Postgres Database config variables
|
||||
# You can leave POSTGRES_DATABASE blank. The default name of
|
||||
# the database in the production environment is chatwoot_production
|
||||
POSTGRES_DATABASE=chatwoot_production
|
||||
POSTGRES_HOST=postgres
|
||||
POSTGRES_USERNAME={{ chatwoot_postgres_username }}
|
||||
POSTGRES_PASSWORD={{ chatwoot_postgres_password }}
|
||||
RAILS_ENV=production
|
||||
# Changes the Postgres query timeout limit. The default is 14 seconds. Modify only when required.
|
||||
# POSTGRES_STATEMENT_TIMEOUT=14s
|
||||
RAILS_MAX_THREADS=5
|
||||
|
||||
# The email from which all outgoing emails are sent
|
||||
# could user either `email@yourdomain.com` or `BrandName <email@yourdomain.com>`
|
||||
MAILER_SENDER_EMAIL={{ company_name }} <support@{{ domain }}>
|
||||
|
||||
#SMTP domain key is set up for HELO checking
|
||||
SMTP_DOMAIN=mail.{{ domain }}
|
||||
# Set the value to "mailhog" if using docker-compose for development environments,
|
||||
# Set the value as "localhost" or your SMTP address in other environments
|
||||
# If SMTP_ADDRESS is empty, Chatwoot would try to use sendmail(postfix)
|
||||
SMTP_ADDRESS=support@{{ domain }}
|
||||
SMTP_PORT=587
|
||||
SMTP_USERNAME=support@{{ domain }} # Optional, only if SMTP server requires authentication
|
||||
SMTP_PASSWORD= # Optional, only if SMTP server requires authentication
|
||||
# plain,login,cram_md5
|
||||
SMTP_AUTHENTICATION=login
|
||||
SMTP_ENABLE_STARTTLS_AUTO=true
|
||||
# Can be: 'none', 'peer', 'client_once', 'fail_if_no_peer_cert', see http://api.rubyonrails.org/classes/ActionMailer/Base.html
|
||||
SMTP_OPENSSL_VERIFY_MODE=peer
|
||||
# Comment out the following environment variables if required by your SMTP server
|
||||
SMTP_TLS=true
|
||||
SMTP_SSL=
|
||||
|
||||
# Mail Incoming
|
||||
# This is the domain set for the reply emails when conversation continuity is enabled
|
||||
MAILER_INBOUND_EMAIL_DOMAIN={{ domain }}
|
||||
# Set this to appropriate ingress channel with regards to incoming emails
|
||||
# Possible values are :
|
||||
# relay for Exim, Postfix, Qmail
|
||||
# mailgun for Mailgun
|
||||
# mandrill for Mandrill
|
||||
# postmark for Postmark
|
||||
# sendgrid for Sendgrid
|
||||
RAILS_INBOUND_EMAIL_SERVICE=relay
|
||||
# Use one of the following based on the email ingress service
|
||||
# Ref: https://edgeguides.rubyonrails.org/action_mailbox_basics.html
|
||||
RAILS_INBOUND_EMAIL_PASSWORD= {{ chatwoot_rails_inbound_email_password }}
|
||||
MAILGUN_INGRESS_SIGNING_KEY=
|
||||
MANDRILL_INGRESS_API_KEY=
|
||||
|
||||
# Storage
|
||||
ACTIVE_STORAGE_SERVICE=local
|
||||
|
||||
# Amazon S3
|
||||
# documentation: https://www.chatwoot.com/docs/configuring-s3-bucket-as-cloud-storage
|
||||
S3_BUCKET_NAME=
|
||||
AWS_ACCESS_KEY_ID=
|
||||
AWS_SECRET_ACCESS_KEY=
|
||||
AWS_REGION=
|
||||
|
||||
# Log settings
|
||||
# Disable if you want to write logs to a file
|
||||
RAILS_LOG_TO_STDOUT=true
|
||||
LOG_LEVEL=info
|
||||
LOG_SIZE=500
|
||||
# Configure this environment variable if you want to use lograge instead of rails logger
|
||||
#LOGRAGE_ENABLED=true
|
||||
|
||||
### This environment variables are only required if you are setting up social media channels
|
||||
|
||||
# Facebook
|
||||
# documentation: https://www.chatwoot.com/docs/facebook-setup
|
||||
FB_VERIFY_TOKEN=
|
||||
FB_APP_SECRET=
|
||||
FB_APP_ID=
|
||||
|
||||
# https://developers.facebook.com/docs/messenger-platform/instagram/get-started#app-dashboard
|
||||
IG_VERIFY_TOKEN=
|
||||
|
||||
# Twitter
|
||||
# documentation: https://www.chatwoot.com/docs/twitter-app-setup
|
||||
TWITTER_APP_ID=
|
||||
TWITTER_CONSUMER_KEY=
|
||||
TWITTER_CONSUMER_SECRET=
|
||||
TWITTER_ENVIRONMENT=
|
||||
|
||||
#slack integration
|
||||
SLACK_CLIENT_ID=
|
||||
SLACK_CLIENT_SECRET=
|
||||
|
||||
# Google OAuth
|
||||
GOOGLE_OAUTH_CLIENT_ID=
|
||||
GOOGLE_OAUTH_CLIENT_SECRET=
|
||||
GOOGLE_OAUTH_CALLBACK_URL=
|
||||
|
||||
### Change this env variable only if you are using a custom build mobile app
|
||||
## Mobile app env variables
|
||||
IOS_APP_ID=L7YLMN4634.com.chatwoot.app
|
||||
ANDROID_BUNDLE_ID=com.chatwoot.app
|
||||
|
||||
# https://developers.google.com/android/guides/client-auth (use keytool to print the fingerprint in the first section)
|
||||
ANDROID_SHA256_CERT_FINGERPRINT=AC:73:8E:DE:EB:56:EA:CC:10:87:02:A7:65:37:7B:38:D4:5D:D4:53:F8:3B:FB:D3:C6:28:64:1D:AA:08:1E:D8
|
||||
|
||||
### Smart App Banner
|
||||
# https://developer.apple.com/library/archive/documentation/AppleApplications/Reference/SafariWebContent/PromotingAppswithAppBanners/PromotingAppswithAppBanners.html
|
||||
# You can find your app-id in https://itunesconnect.apple.com
|
||||
#IOS_APP_IDENTIFIER=1495796682
|
||||
|
||||
## Push Notification
|
||||
## generate a new key value here : https://d3v.one/vapid-key-generator/
|
||||
# VAPID_PUBLIC_KEY=
|
||||
# VAPID_PRIVATE_KEY=
|
||||
#
|
||||
# for mobile apps
|
||||
# FCM_SERVER_KEY=
|
||||
|
||||
### APM and Error Monitoring configurations
|
||||
## Elastic APM
|
||||
## https://www.elastic.co/guide/en/apm/agent/ruby/current/getting-started-rails.html
|
||||
# ELASTIC_APM_SERVER_URL=
|
||||
# ELASTIC_APM_SECRET_TOKEN=
|
||||
|
||||
## Sentry
|
||||
# SENTRY_DSN=
|
||||
|
||||
## LogRocket
|
||||
# LOG_ROCKET_PROJECT_ID=xxxxx/some-project
|
||||
|
||||
# MICROSOFT CLARITY
|
||||
# MS_CLARITY_TOKEN=xxxxxxxxx
|
||||
|
||||
## Scout
|
||||
## https://scoutapm.com/docs/ruby/configuration
|
||||
# SCOUT_KEY=YOURKEY
|
||||
# SCOUT_NAME=YOURAPPNAME (Production)
|
||||
# SCOUT_MONITOR=true
|
||||
|
||||
## NewRelic
|
||||
# https://docs.newrelic.com/docs/agents/ruby-agent/configuration/ruby-agent-configuration/
|
||||
# NEW_RELIC_LICENSE_KEY=
|
||||
# Set this to true to allow newrelic apm to send logs.
|
||||
# This is turned off by default.
|
||||
# NEW_RELIC_APPLICATION_LOGGING_ENABLED=
|
||||
|
||||
## Datadog
|
||||
## https://github.com/DataDog/dd-trace-rb/blob/master/docs/GettingStarted.md#environment-variables
|
||||
# DD_TRACE_AGENT_URL=
|
||||
|
||||
# MaxMindDB API key to download GeoLite2 City database
|
||||
# IP_LOOKUP_API_KEY=
|
||||
|
||||
## Rack Attack configuration
|
||||
## To prevent and throttle abusive requests
|
||||
# ENABLE_RACK_ATTACK=true
|
||||
|
||||
## Running chatwoot as an API only server
|
||||
## setting this value to true will disable the frontend dashboard endpoints
|
||||
# CW_API_ONLY_SERVER=false
|
||||
|
||||
## Development Only Config
|
||||
# if you want to use letter_opener for local emails
|
||||
# LETTER_OPENER=true
|
||||
# meant to be used in github codespaces
|
||||
# WEBPACKER_DEV_SERVER_PUBLIC=
|
||||
|
||||
# If you want to use official mobile app,
|
||||
# the notifications would be relayed via a Chatwoot server
|
||||
ENABLE_PUSH_RELAY_SERVER=true
|
||||
|
||||
# Stripe API key
|
||||
STRIPE_SECRET_KEY=
|
||||
STRIPE_WEBHOOK_SECRET=
|
||||
|
||||
# Set to true if you want to upload files to cloud storage using the signed url
|
||||
# Make sure to follow https://edgeguides.rubyonrails.org/active_storage_overview.html#cross-origin-resource-sharing-cors-configuration on the cloud storage after setting this to true.
|
||||
DIRECT_UPLOADS_ENABLED=
|
||||
|
||||
#MS OAUTH creds
|
||||
AZURE_APP_ID=
|
||||
AZURE_APP_SECRET=
|
||||
|
||||
## Advanced configurations
|
||||
## Change these values to fine tune performance
|
||||
# control the concurrency setting of sidekiq
|
||||
# SIDEKIQ_CONCURRENCY=10
|
||||
|
||||
|
||||
# AI powered features
|
||||
## OpenAI key
|
||||
OPENAI_API_KEY=
|
||||
|
||||
# Sentiment analysis model file path
|
||||
SENTIMENT_FILE_PATH=
|
||||
121
letsbe-ansible-runner/stacks/chatwoot/docker-compose.yml
Normal file
121
letsbe-ansible-runner/stacks/chatwoot/docker-compose.yml
Normal file
@@ -0,0 +1,121 @@
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
rails:
|
||||
image: chatwoot/chatwoot:latest
|
||||
container_name: {{ customer }}-chatwoot-rails
|
||||
env_file: /opt/letsbe/env/chatwoot.env
|
||||
restart: always
|
||||
labels:
|
||||
- "diun.enable=true"
|
||||
depends_on:
|
||||
- postgres
|
||||
- redis
|
||||
ports:
|
||||
- '127.0.0.1:3011:3000'
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
- RAILS_ENV=production
|
||||
- INSTALLATION_ENV=docker
|
||||
entrypoint: docker/entrypoints/rails.sh
|
||||
command: ['bundle', 'exec', 'rails', 's', '-p', '3000', '-b', '0.0.0.0']
|
||||
volumes:
|
||||
- {{ customer }}-chatwoot-storage:/app/storage
|
||||
- {{ customer }}-chatwoot-backups:/tmp/backups
|
||||
networks:
|
||||
{{ customer }}-chatwoot:
|
||||
ipv4_address: 172.20.1.2
|
||||
|
||||
sidekiq:
|
||||
container_name: {{ customer }}-chatwoot-sidekiq
|
||||
image: chatwoot/chatwoot:latest
|
||||
restart: always
|
||||
env_file: /opt/letsbe/env/chatwoot.env
|
||||
depends_on:
|
||||
- postgres
|
||||
- redis
|
||||
environment:
|
||||
- NODE_ENV=production
|
||||
- RAILS_ENV=production
|
||||
- INSTALLATION_ENV=docker
|
||||
command: ['bundle', 'exec', 'sidekiq', '-C', 'config/sidekiq.yml']
|
||||
volumes:
|
||||
- {{ customer }}-chatwoot-storage:/app/storage
|
||||
networks:
|
||||
{{ customer }}-chatwoot:
|
||||
ipv4_address: 172.20.1.3
|
||||
|
||||
postgres:
|
||||
container_name: {{ customer }}-chatwoot-postgres
|
||||
image: pgvector/pgvector:pg16
|
||||
restart: always
|
||||
ports:
|
||||
- '127.0.0.1:3049:5432'
|
||||
volumes:
|
||||
- {{ customer }}-chatwoot-postgres:/var/lib/postgresql/data
|
||||
- {{ customer }}-chatwoot-backups:/tmp/backups
|
||||
environment:
|
||||
- POSTGRES_DB=chatwoot_production
|
||||
- POSTGRES_USER={{ chatwoot_postgres_username }}
|
||||
# Please provide your own password.
|
||||
- POSTGRES_PASSWORD={{ chatwoot_postgres_password }}
|
||||
networks:
|
||||
{{ customer }}-chatwoot:
|
||||
ipv4_address: 172.20.1.4
|
||||
|
||||
redis:
|
||||
image: redis:alpine
|
||||
container_name: {{ customer }}-chatwoot-redis
|
||||
restart: always
|
||||
command: ["sh", "-c", "redis-server --requirepass \"$REDIS_PASSWORD\""]
|
||||
env_file: /opt/letsbe/env/chatwoot.env
|
||||
volumes:
|
||||
- {{ customer }}-chatwoot-redis:/data
|
||||
ports:
|
||||
- '127.0.0.1:3050:6379'
|
||||
networks:
|
||||
{{ customer }}-chatwoot:
|
||||
ipv4_address: 172.20.1.5
|
||||
|
||||
getmail:
|
||||
image: python:3.12-alpine
|
||||
container_name: {{ customer }}-chatwoot-getmail
|
||||
restart: always
|
||||
depends_on:
|
||||
- rails
|
||||
environment:
|
||||
INGRESS_PASSWORD: ${RAILS_INBOUND_EMAIL_PASSWORD}
|
||||
CHATWOOT_RELAY_URL: http://rails:3000/rails/action_mailbox/relay/inbound_emails
|
||||
volumes:
|
||||
- type: bind
|
||||
source: /opt/letsbe/stacks/chatwoot/getmail
|
||||
target: /opt/getmail
|
||||
entrypoint: >
|
||||
sh -c "
|
||||
apk add --no-cache curl ca-certificates &&
|
||||
pip install --no-cache-dir getmail6 &&
|
||||
chmod +x /opt/getmail/import_mail_to_chatwoot || true &&
|
||||
while true; do
|
||||
for f in /opt/getmail/getmailrc /opt/getmail/getmailrc-*; do
|
||||
[ -f \"$f\" ] || continue
|
||||
getmail --getmaildir /opt/getmail --rcfile \"$(basename \"$f\")\" --quiet > done
|
||||
sleep 60
|
||||
done
|
||||
"
|
||||
networks:
|
||||
{{ customer }}-chatwoot:
|
||||
ipv4_address: 172.20.1.6
|
||||
|
||||
networks:
|
||||
{{ customer }}-chatwoot:
|
||||
ipam:
|
||||
driver: default
|
||||
config:
|
||||
- subnet: 172.20.1.0/28
|
||||
gateway: 172.20.1.1
|
||||
|
||||
volumes:
|
||||
{{ customer }}-chatwoot-storage:
|
||||
{{ customer }}-chatwoot-postgres:
|
||||
{{ customer }}-chatwoot-redis:
|
||||
{{ customer }}-chatwoot-backups:
|
||||
Reference in New Issue
Block a user