deep-foundation / deep-foundation/deeplinks

Snapshot for production build

Open
#276 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
TypeScript
Stars
13
Forks
8
PR merge metrics
No merged PRs in 30d

Description

### Is your feature request related to a problem? Please describe.

Command: `npm run snapshot:create`
in [package json](https://github.com/deep-foundation/deeplinks/blob/main/package.json#L32)
run https://github.com/deep-tfoundation/deeplinks/blob/main/snapshots/create.js#L20 where:

```ts
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`);
```
Look at: run from docker-**prod**/deep.

But snapshots ofthen run in gitpod for **local** developement.

And I want to create snapshot for **production**. But production config is placed in **local** folder: /root/.nvm/versions/node/v18.18.2/lib/node_modules/@deep-foundation/deeplinks/local/docker-compose.yml

1. Maybe create two different group of commands npm run snapshot:create/last for **prod** and **local**?
2. Maybe need use **local** folder for local development and **prod** for production?
3. Need snippet in cheat sheet about how to use snapshots [not only in local development](https://github.com/deep-foundation/documentation/wiki/CheatSheet#create-a-snapshot), but also in production.

[Discussion in discord](https://discord.com/channels/739430470345031692/970660322853670953/1176651507500843058)

### Describe the solution you'd like

_No response_

### Describe alternatives you've considered

_No response_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.