fix: chatwoot ENV

This commit is contained in:
DrMxrcy
2024-11-13 05:33:37 -05:00
parent 9b77573269
commit 444302e7b9
2 changed files with 8 additions and 15 deletions

View File

@@ -19,7 +19,7 @@ services:
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
test: ["CMD-SHELL", "pg_isready -U postgres -h localhost -d chatwoot_production"]
interval: 10s
timeout: 5s
retries: 5
@@ -58,9 +58,9 @@ services:
- RAILS_LOG_TO_STDOUT=true
command: >
sh -c "
until PGPASSWORD=${POSTGRES_PASSWORD} psql -h postgres -U postgres -d chatwoot_production -c '\q'; do
echo 'Waiting for postgres...'
sleep 5
echo 'Waiting for postgres...'
while ! PGPASSWORD='${POSTGRES_PASSWORD}' psql -h postgres -U postgres -d chatwoot_production -c 'SELECT 1' > /dev/null 2>&1; do
sleep 1
done
echo 'PostgreSQL is ready!'
bundle exec rails db:chatwoot_prepare

View File

@@ -2,9 +2,9 @@ import {
type DomainSchema,
type Schema,
type Template,
generatePassword,
generateRandomDomain,
generateBase64,
generateRandomDomain,
generatePassword,
} from "../utils";
export function generate(schema: Schema): Template {
@@ -22,17 +22,10 @@ export function generate(schema: Schema): Template {
];
const envs = [
`POSTGRES_USERNAME=postgres`,
`POSTGRES_USER=postgres`,
`POSTGRES_PASSWORD=${postgresPassword}`,
`POSTGRES_DB=chatwoot_production`,
`REDIS_PASSWORD=${redisPassword}`,
`CHATWOOT_HOST=${mainDomain}`,
`POSTGRES_PASSWORD=${postgresPassword}`,
`REDIS_PASSWORD=${redisPassword}`,
`SECRET_KEY_BASE=${secretKeyBase}`,
`SMTP_ADDRESS=`,
`SMTP_PORT=587`,
`SMTP_USERNAME=`,
`SMTP_PASSWORD=`,
];
return {