forked from syntaxbullet/aurorabot
docs: clarify update command behavior in production Docker environment
This commit is contained in:
@@ -263,11 +263,21 @@ export class UpdateService {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Trigger a restart
|
* Trigger a restart
|
||||||
|
*
|
||||||
|
* In production Docker (with restart: unless-stopped), exiting the process
|
||||||
|
* will cause Docker to restart the container. For a full rebuild with code changes,
|
||||||
|
* use the deploy.sh script or GitHub Actions CI/CD instead of this command.
|
||||||
|
*
|
||||||
|
* Note: The /update command works for hot-reloading in development and minor
|
||||||
|
* restarts in production, but for production deployments with new code,
|
||||||
|
* use: `cd ~/Aurora && git pull && docker compose -f docker-compose.prod.yml up -d --build`
|
||||||
*/
|
*/
|
||||||
static async triggerRestart(): Promise<void> {
|
static async triggerRestart(): Promise<void> {
|
||||||
if (process.env.RESTART_COMMAND) {
|
if (process.env.RESTART_COMMAND) {
|
||||||
|
// Custom restart command from environment
|
||||||
exec(process.env.RESTART_COMMAND).unref();
|
exec(process.env.RESTART_COMMAND).unref();
|
||||||
} else {
|
} else {
|
||||||
|
// Exit process - Docker will restart container, dev mode will hot-reload
|
||||||
setTimeout(() => process.exit(0), 100);
|
setTimeout(() => process.exit(0), 100);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user