Skip to content

Commit

Permalink
Merge main into sweep/add-sweep-config
Browse files Browse the repository at this point in the history
  • Loading branch information
deep-foundation-sweepai[bot] authored Oct 1, 2023
2 parents 19c4878 + c6703b1 commit 0927480
Show file tree
Hide file tree
Showing 10 changed files with 226 additions and 85 deletions.
229 changes: 152 additions & 77 deletions package-lock.json

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@
"local-reinit": "npm run docker-clear; npm run rm-migrates; npm run local-engine;",
"gitpod-reinit": "npm run docker-clear; npm run rm-migrates; npm run gitpod-engine;",
"gitpod-hasura-reattach": "export REATTACH_HASURA_SECRET=myadminsecretkey; export REATTACH_HASURA_PATH=$(echo $(gp url 8080) | awk -F[/:] '{print $4}'); export REATTACH_HASURA_SSL=1; export REATTACH_DEEPLINKS_PATH=$(echo $(gp url 3006) | awk -F[/:] '{print $4}'); npx gulp gitpod:hasura:reattach",
"codespaces-hasura-reattach": "export REATTACH_HASURA_SECRET=myadminsecretkey; export REATTACH_HASURA_PATH=localhost:8080; export REATTACH_HASURA_SSL=0; export REATTACH_DEEPLINKS_PATH=host.docker.internal:3006; npx gulp gitpod:hasura:reattach"
"codespaces-hasura-reattach": "export REATTACH_HASURA_SECRET=myadminsecretkey; export REATTACH_HASURA_PATH=localhost:8080; export REATTACH_HASURA_SSL=0; export REATTACH_DEEPLINKS_PATH=host.docker.internal:3006; npx gulp gitpod:hasura:reattach",
"sync": "(cd packages && for d in */; do (cd $d && git checkout main && git pull --no-rebase); done) && git add . && git commit -m 'sync' && git push"
},
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion packages/deepcase
2 changes: 1 addition & 1 deletion packages/deepcase-app
2 changes: 1 addition & 1 deletion packages/deeplinks
Submodule deeplinks updated 1 files
+3 −4 index.ts
2 changes: 1 addition & 1 deletion packages/js-docker-isolation-provider
2 changes: 1 addition & 1 deletion packages/python-docker-isolation-provider
2 changes: 1 addition & 1 deletion packages/store
65 changes: 65 additions & 0 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,11 +120,19 @@ docker ps -a

### Restart

Entire docker

```
sudo systemctl stop docker
sudo systemctl start docker
```

Single docker container

```
docker restart deep-links
```

### Restore/Update

Optional - update deeplinks.
Expand Down Expand Up @@ -316,3 +324,60 @@ Manual
- `npm run gulp -- package:delete --name NAMEINPACKAGESDIRECTORY` delete submodule
- `npm run gulp -- assets:update` copy all assets from ./assets in to each package
- `npm run gulp -- packages:sync` sync all dependenced packages in workspace

## Diagnostics

### PostgreSQL

#### Get PostgreSQL logs:

```sh
docker logs deep-postgres
```

#### Connect to PostgreSQL from inside its docker container:

```sh
docker exec -it deep-postgres bash
su postgres
psql
```

#### Get the size of all tables in the databases and indexes:
```sql
SELECT
nspname AS "schema",
pg_class.relname AS "table",
pg_size_pretty(pg_total_relation_size(pg_class.oid)) AS "total_size",
pg_size_pretty(pg_relation_size(pg_class.oid)) AS "data_size",
pg_size_pretty(pg_indexes_size(pg_class.oid)) AS "index_size",
pg_stat_user_tables.n_live_tup AS "rows",
pg_size_pretty(
pg_total_relation_size(pg_class.oid) /
(pg_stat_user_tables.n_live_tup + 1)
) AS "total_row_size",
pg_size_pretty(
pg_relation_size(pg_class.oid) /
(pg_stat_user_tables.n_live_tup + 1)
) AS "row_size"
FROM
pg_stat_user_tables
JOIN
pg_class
ON
pg_stat_user_tables.relid = pg_class.oid
JOIN
pg_catalog.pg_namespace AS ns
ON
pg_class.relnamespace = ns.oid
ORDER BY
pg_total_relation_size(pg_class.oid) DESC;
```

### JS Docker Isolation Provider

#### Get container logs:

```sh
docker logs $(docker ps -a -q --filter "ancestor=deepf/js-docker-isolation-provider:main")
```

0 comments on commit 0927480

Please sign in to comment.