Skip to content

Commit 6507593

Browse files
authored
feat: deploy-compose NGINX volume mapping, add image removal to update script (danny-avila#1211)
1 parent 398687f commit 6507593

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

config/deployed-update.js

+13
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,19 @@ const shouldRebase = process.argv.includes('--rebase');
4040
console.orange(downCommand);
4141
execSync(downCommand, { stdio: 'inherit' });
4242

43+
console.purple('Removing all tags for LibreChat `deployed` images...');
44+
const repositories = ['ghcr.io/danny-avila/librechat-dev-api', 'librechat-client'];
45+
repositories.forEach((repo) => {
46+
const tags = execSync(`sudo docker images ${repo} -q`, { encoding: 'utf8' })
47+
.split('\n')
48+
.filter(Boolean);
49+
tags.forEach((tag) => {
50+
const removeImageCommand = `sudo docker rmi ${tag}`;
51+
console.orange(removeImageCommand);
52+
execSync(removeImageCommand, { stdio: 'inherit' });
53+
});
54+
});
55+
4356
console.purple('Pulling latest LibreChat images...');
4457
const pullCommand = 'sudo docker-compose -f ./deploy-compose.yml pull api';
4558
console.orange(pullCommand);

deploy-compose.yml

+2
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@ services:
3636
depends_on:
3737
- api
3838
restart: always
39+
volumes:
40+
- ./client/nginx.conf:/etc/nginx/conf.d/default.conf
3941
mongodb:
4042
container_name: chat-mongodb
4143
# ports: # Uncomment this to access mongodb from outside docker, not safe in deployment

0 commit comments

Comments
 (0)