Add: Redis Password to AP

This commit is contained in:
DrMxrcy 2024-11-13 04:48:11 -05:00
parent cab9443d25
commit b5fa411093
2 changed files with 6 additions and 3 deletions

View File

@ -19,7 +19,9 @@ services:
- AP_POSTGRES_PORT=5432
- AP_REDIS_HOST=redis
- AP_REDIS_PORT=6379
- AP_REDIS_URL=redis://:${REDIS_PASSWORD}@redis:6379
- AP_ENVIRONMENT=prod
- AP_FRONTEND_URL=https://${AP_HOST}
- AP_ENCRYPTION_KEY=${AP_ENCRYPTION_KEY}
- AP_JWT_SECRET=${AP_JWT_SECRET}
- AP_ENGINE_EXECUTABLE_PATH=dist/packages/engine/main.js
@ -49,13 +51,13 @@ services:
redis:
image: redis:7.0.7
restart: unless-stopped
command: redis-server --requirepass ${REDIS_PASSWORD}
networks:
- dokploy-network
volumes:
- redis_data:/data
healthcheck:
test: ["CMD", "redis-cli", "ping"]
test: ["CMD", "redis-cli", "-a", "${REDIS_PASSWORD}", "ping"]
interval: 10s
timeout: 5s
retries: 5

View File

@ -9,11 +9,11 @@ import {
export function generate(schema: Schema): Template {
const mainDomain = generateRandomDomain(schema);
const apiKey = generateBase64(48);
const postgresPassword = generateBase64(24);
const jwtSecret = generateBase64(24);
const encryptionKey = generateBase64(12);
const redisPassword = generateBase64(24);
const postgresUser = "activepieces";
const postgresDb = "activepieces";
@ -34,6 +34,7 @@ export function generate(schema: Schema): Template {
`AP_API_KEY=${apiKey}`,
`AP_ENCRYPTION_KEY=${encryptionKey}`,
`AP_JWT_SECRET=${jwtSecret}`,
`REDIS_PASSWORD=${redisPassword}`,
];
return {