Skip to content

Commit

Permalink
0.0.454 snapshots fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ivansglazunov committed Sep 8, 2024
1 parent b2dcf6d commit ee22ad2
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@deep-foundation/deeplinks",
"version": "0.0.453",
"version": "0.0.454",
"license": "Unlicense",
"type": "module",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion snapshots/create.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const create = async () => {
const snapshots = files.filter(file => /^-?[0-9]+$/.test(file));
const last = snapshots[snapshots.length - 1];
const time = (new Date()).getTime();
const { stdout, stderr } = await execP(`cd docker-prod/deep && (docker compose -f docker-compose.yml stop hasura postgres || true) && docker run -v ${_deeplinks}:/deeplinks --volumes-from deep-postgres --rm --name links --entrypoint \"sh\" deepf/deeplinks:main -c \"cd / && ls var/lib/postgresql && tar -c -v -C /var/lib/postgresql -f /deeplinks/snapshots/${time} ./data" && docker compose -f docker-compose.yml start hasura postgres && cd ../.. && cp .migrate snapshots/${time}.migrate`);
const { stdout, stderr } = await execP(`(docker compose -f docker-compose.yml stop hasura postgres || true) && docker run -v ${_deeplinks}:/deeplinks --volumes-from deep-postgres --rm --name links --entrypoint \"sh\" deepf/deeplinks:main -c \"cd / && ls var/lib/postgresql && tar -c -v -C /var/lib/postgresql -f /deeplinks/snapshots/${time} ./data" && docker compose -f docker-compose.yml start hasura postgres && cp .migrate snapshots/${time}.migrate`);
console.log('stdout',stdout);
console.log('stderr',stderr);
}
Expand Down
2 changes: 1 addition & 1 deletion snapshots/last.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const last = async () => {
const files = await fs.readdir('./snapshots');
const snapshots = files.filter(file => /^-?[0-9]+$/.test(file));
const last = snapshots[snapshots.length - 1];
const { stdout, stderr } = await execP(`cd docker-prod/deep && (docker compose -p deep -f docker-compose.yml stop hasura postgres || true ) && docker run -v ${_deeplinks}:/deeplinks -v deep-db-data:/data --rm --name links --entrypoint \"sh\" deepf/deeplinks:main -c \"cd / && tar xf deeplinks/snapshots/${last} --strip 1\" && (docker compose -p deep up -d hasura postgres || true) && cd ../.. && cp snapshots/${last}.migrate .migrate`);
const { stdout, stderr } = await execP(`(docker compose -p deep -f docker-compose.yml stop hasura postgres || true ) && docker run -v ${_deeplinks}:/deeplinks -v deep-db-data:/data --rm --name links --entrypoint \"sh\" deepf/deeplinks:main -c \"cd / && tar xf deeplinks/snapshots/${last} --strip 1\" && (docker compose -p deep up -d hasura postgres || true) && cp snapshots/${last}.migrate .migrate`);
console.log('stdout',stdout);
console.log('stderr',stderr);
}
Expand Down

0 comments on commit ee22ad2

Please sign in to comment.