mirror of
https://github.com/Dokploy/dokploy
synced 2025-06-26 18:27:59 +00:00
fix: Envs
This commit is contained in:
@@ -2,7 +2,6 @@ import {
|
|||||||
type DomainSchema,
|
type DomainSchema,
|
||||||
type Schema,
|
type Schema,
|
||||||
type Template,
|
type Template,
|
||||||
generateBase64,
|
|
||||||
generateRandomDomain,
|
generateRandomDomain,
|
||||||
} from "../utils";
|
} from "../utils";
|
||||||
|
|
||||||
@@ -15,7 +14,8 @@ export function generate(schema: Schema): Template {
|
|||||||
Math.floor(Math.random() * 16).toString(16)).join('');
|
Math.floor(Math.random() * 16).toString(16)).join('');
|
||||||
const postgresPassword = Array.from({length: 32}, () =>
|
const postgresPassword = Array.from({length: 32}, () =>
|
||||||
Math.floor(Math.random() * 16).toString(16)).join('');
|
Math.floor(Math.random() * 16).toString(16)).join('');
|
||||||
const redisPassword = generateBase64(32);
|
const redisPassword = Array.from({length: 32}, () =>
|
||||||
|
Math.floor(Math.random() * 16).toString(16)).join('');
|
||||||
|
|
||||||
const postgresUser = "activepieces";
|
const postgresUser = "activepieces";
|
||||||
const postgresDb = "activepieces";
|
const postgresDb = "activepieces";
|
||||||
|
|||||||
@@ -15,9 +15,9 @@ services:
|
|||||||
volumes:
|
volumes:
|
||||||
- postgres_data:/var/lib/postgresql/data
|
- postgres_data:/var/lib/postgresql/data
|
||||||
environment:
|
environment:
|
||||||
- POSTGRES_DB=chatwoot_production
|
POSTGRES_DB: chatwoot_production
|
||||||
- POSTGRES_USER=postgres
|
POSTGRES_USER: postgres
|
||||||
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD-SHELL", "pg_isready -U postgres -h localhost -d chatwoot_production"]
|
test: ["CMD-SHELL", "pg_isready -U postgres -h localhost -d chatwoot_production"]
|
||||||
interval: 10s
|
interval: 10s
|
||||||
@@ -29,11 +29,11 @@ services:
|
|||||||
image: redis:alpine
|
image: redis:alpine
|
||||||
networks:
|
networks:
|
||||||
- dokploy-network
|
- dokploy-network
|
||||||
command: ["sh", "-c", "redis-server --requirepass \"${REDIS_PASSWORD}\""]
|
command: redis-server --requirepass ${REDIS_PASSWORD}
|
||||||
volumes:
|
volumes:
|
||||||
- redis_data:/data
|
- redis_data:/data
|
||||||
healthcheck:
|
healthcheck:
|
||||||
test: ["CMD", "redis-cli", "ping"]
|
test: ["CMD", "redis-cli", "-a", "${REDIS_PASSWORD}", "ping"]
|
||||||
interval: 10s
|
interval: 10s
|
||||||
timeout: 5s
|
timeout: 5s
|
||||||
retries: 5
|
retries: 5
|
||||||
@@ -42,25 +42,26 @@ services:
|
|||||||
setup:
|
setup:
|
||||||
<<: *base
|
<<: *base
|
||||||
environment:
|
environment:
|
||||||
- NODE_ENV=production
|
NODE_ENV: production
|
||||||
- RAILS_ENV=production
|
RAILS_ENV: production
|
||||||
- INSTALLATION_ENV=docker
|
INSTALLATION_ENV: docker
|
||||||
- FRONTEND_URL=http://${CHATWOOT_HOST}
|
FRONTEND_URL: http://${CHATWOOT_HOST}
|
||||||
- SECRET_KEY_BASE=${SECRET_KEY_BASE}
|
SECRET_KEY_BASE: ${SECRET_KEY_BASE}
|
||||||
- POSTGRES_HOST=postgres
|
POSTGRES_HOST: postgres
|
||||||
- POSTGRES_USERNAME=postgres
|
POSTGRES_USER: postgres
|
||||||
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
||||||
- POSTGRES_DATABASE=chatwoot_production
|
POSTGRES_DB: chatwoot_production
|
||||||
- REDIS_URL=redis://redis:6379
|
REDIS_URL: redis://redis:6379
|
||||||
- REDIS_PASSWORD=${REDIS_PASSWORD}
|
REDIS_PASSWORD: ${REDIS_PASSWORD}
|
||||||
- ENABLE_ACCOUNT_SIGNUP=false
|
ENABLE_ACCOUNT_SIGNUP: "false"
|
||||||
- FORCE_SSL=false
|
FORCE_SSL: "false"
|
||||||
- RAILS_LOG_TO_STDOUT=true
|
RAILS_LOG_TO_STDOUT: "true"
|
||||||
command: >
|
command: >
|
||||||
sh -c "
|
sh -c "
|
||||||
echo 'Waiting for postgres...'
|
echo 'Waiting for postgres...'
|
||||||
while ! PGPASSWORD='${POSTGRES_PASSWORD}' psql -h postgres -U postgres -d chatwoot_production -c 'SELECT 1' > /dev/null 2>&1; do
|
until PGPASSWORD=${POSTGRES_PASSWORD} psql -h postgres -U postgres -d chatwoot_production -c '\q' > /dev/null 2>&1; do
|
||||||
sleep 1
|
sleep 5
|
||||||
|
echo 'Waiting for postgres...'
|
||||||
done
|
done
|
||||||
echo 'PostgreSQL is ready!'
|
echo 'PostgreSQL is ready!'
|
||||||
bundle exec rails db:chatwoot_prepare
|
bundle exec rails db:chatwoot_prepare
|
||||||
@@ -81,20 +82,20 @@ services:
|
|||||||
redis:
|
redis:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
environment:
|
environment:
|
||||||
- NODE_ENV=production
|
NODE_ENV: production
|
||||||
- RAILS_ENV=production
|
RAILS_ENV: production
|
||||||
- INSTALLATION_ENV=docker
|
INSTALLATION_ENV: docker
|
||||||
- FRONTEND_URL=http://${CHATWOOT_HOST}
|
FRONTEND_URL: http://${CHATWOOT_HOST}
|
||||||
- SECRET_KEY_BASE=${SECRET_KEY_BASE}
|
SECRET_KEY_BASE: ${SECRET_KEY_BASE}
|
||||||
- POSTGRES_HOST=postgres
|
POSTGRES_HOST: postgres
|
||||||
- POSTGRES_USERNAME=postgres
|
POSTGRES_USER: postgres
|
||||||
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
||||||
- POSTGRES_DATABASE=chatwoot_production
|
POSTGRES_DB: chatwoot_production
|
||||||
- REDIS_URL=redis://redis:6379
|
REDIS_URL: redis://redis:6379
|
||||||
- REDIS_PASSWORD=${REDIS_PASSWORD}
|
REDIS_PASSWORD: ${REDIS_PASSWORD}
|
||||||
- ENABLE_ACCOUNT_SIGNUP=false
|
ENABLE_ACCOUNT_SIGNUP: "false"
|
||||||
- FORCE_SSL=false
|
FORCE_SSL: "false"
|
||||||
- RAILS_LOG_TO_STDOUT=true
|
RAILS_LOG_TO_STDOUT: "true"
|
||||||
entrypoint: docker/entrypoints/rails.sh
|
entrypoint: docker/entrypoints/rails.sh
|
||||||
command: ['bundle', 'exec', 'rails', 's', '-p', '3000', '-b', '0.0.0.0']
|
command: ['bundle', 'exec', 'rails', 's', '-p', '3000', '-b', '0.0.0.0']
|
||||||
restart: always
|
restart: always
|
||||||
@@ -107,19 +108,19 @@ services:
|
|||||||
redis:
|
redis:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
environment:
|
environment:
|
||||||
- NODE_ENV=production
|
NODE_ENV: production
|
||||||
- RAILS_ENV=production
|
RAILS_ENV: production
|
||||||
- INSTALLATION_ENV=docker
|
INSTALLATION_ENV: docker
|
||||||
- FRONTEND_URL=http://${CHATWOOT_HOST}
|
FRONTEND_URL: http://${CHATWOOT_HOST}
|
||||||
- SECRET_KEY_BASE=${SECRET_KEY_BASE}
|
SECRET_KEY_BASE: ${SECRET_KEY_BASE}
|
||||||
- POSTGRES_HOST=postgres
|
POSTGRES_HOST: postgres
|
||||||
- POSTGRES_USERNAME=postgres
|
POSTGRES_USER: postgres
|
||||||
- POSTGRES_PASSWORD=${POSTGRES_PASSWORD}
|
POSTGRES_PASSWORD: ${POSTGRES_PASSWORD}
|
||||||
- POSTGRES_DATABASE=chatwoot_production
|
POSTGRES_DB: chatwoot_production
|
||||||
- REDIS_URL=redis://redis:6379
|
REDIS_URL: redis://redis:6379
|
||||||
- REDIS_PASSWORD=${REDIS_PASSWORD}
|
REDIS_PASSWORD: ${REDIS_PASSWORD}
|
||||||
- FORCE_SSL=false
|
FORCE_SSL: "false"
|
||||||
- RAILS_LOG_TO_STDOUT=true
|
RAILS_LOG_TO_STDOUT: "true"
|
||||||
command: ['bundle', 'exec', 'sidekiq', '-C', 'config/sidekiq.yml']
|
command: ['bundle', 'exec', 'sidekiq', '-C', 'config/sidekiq.yml']
|
||||||
restart: always
|
restart: always
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user