mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-09-21 21:50:49 +02:00
feat: deploy-compose NGINX volume mapping, add image removal to update script (#1211)
This commit is contained in:
parent
398687fad0
commit
650759306d
2 changed files with 15 additions and 0 deletions
|
@ -40,6 +40,19 @@ const shouldRebase = process.argv.includes('--rebase');
|
||||||
console.orange(downCommand);
|
console.orange(downCommand);
|
||||||
execSync(downCommand, { stdio: 'inherit' });
|
execSync(downCommand, { stdio: 'inherit' });
|
||||||
|
|
||||||
|
console.purple('Removing all tags for LibreChat `deployed` images...');
|
||||||
|
const repositories = ['ghcr.io/danny-avila/librechat-dev-api', 'librechat-client'];
|
||||||
|
repositories.forEach((repo) => {
|
||||||
|
const tags = execSync(`sudo docker images ${repo} -q`, { encoding: 'utf8' })
|
||||||
|
.split('\n')
|
||||||
|
.filter(Boolean);
|
||||||
|
tags.forEach((tag) => {
|
||||||
|
const removeImageCommand = `sudo docker rmi ${tag}`;
|
||||||
|
console.orange(removeImageCommand);
|
||||||
|
execSync(removeImageCommand, { stdio: 'inherit' });
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
console.purple('Pulling latest LibreChat images...');
|
console.purple('Pulling latest LibreChat images...');
|
||||||
const pullCommand = 'sudo docker-compose -f ./deploy-compose.yml pull api';
|
const pullCommand = 'sudo docker-compose -f ./deploy-compose.yml pull api';
|
||||||
console.orange(pullCommand);
|
console.orange(pullCommand);
|
||||||
|
|
|
@ -36,6 +36,8 @@ services:
|
||||||
depends_on:
|
depends_on:
|
||||||
- api
|
- api
|
||||||
restart: always
|
restart: always
|
||||||
|
volumes:
|
||||||
|
- ./client/nginx.conf:/etc/nginx/conf.d/default.conf
|
||||||
mongodb:
|
mongodb:
|
||||||
container_name: chat-mongodb
|
container_name: chat-mongodb
|
||||||
# ports: # Uncomment this to access mongodb from outside docker, not safe in deployment
|
# ports: # Uncomment this to access mongodb from outside docker, not safe in deployment
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue