{"id":18818425,"url":"https://github.com/smithsonian/dpo-packrat","last_synced_at":"2025-04-13T23:32:45.890Z","repository":{"id":38185050,"uuid":"267449457","full_name":"Smithsonian/dpo-packrat","owner":"Smithsonian","description":"Data Repository and Workflow Management for 3D data captures, models, and scenes","archived":false,"fork":false,"pushed_at":"2025-04-11T15:09:54.000Z","size":59861,"stargazers_count":11,"open_issues_count":2,"forks_count":5,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-04-11T15:55:13.455Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Smithsonian.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-05-27T23:46:04.000Z","updated_at":"2025-04-03T21:04:49.000Z","dependencies_parsed_at":"2025-03-21T15:24:32.221Z","dependency_job_id":"9e75eebf-c44e-4b50-9955-05e7e864715d","html_url":"https://github.com/Smithsonian/dpo-packrat","commit_stats":null,"previous_names":[],"tags_count":14,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Smithsonian%2Fdpo-packrat","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Smithsonian%2Fdpo-packrat/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Smithsonian%2Fdpo-packrat/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Smithsonian%2Fdpo-packrat/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Smithsonian","download_url":"https://codeload.github.com/Smithsonian/dpo-packrat/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248796904,"owners_count":21163050,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-08T00:16:40.617Z","updated_at":"2025-04-13T23:32:40.876Z","avatar_url":"https://github.com/Smithsonian.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# dpo-packrat\nData Repository and Workflow Management for 3D data captures, models, and scenes\n\n## Setup instructions (Development):\n*Note: `.env.dev` is required and it follows `.env.template`*\n\n#### Prerequisites:\n* It is recommended to install [Volta](https://volta.sh/) which keeps node version in check. The versions can be specified in `package.json` and when switched to the directory of the project, volta automatically switches to the correct node version.\n* It is also recommended to use [Yarn](https://yarnpkg.com/) as the primary package manager for Packrat.\n\n\n```\ncd ~\ncurl https://get.volta.sh | bash\nvolta install node\nvolta install yarn\n```\nWhen switching to the `dpo-packrat` repo, the node version will automatically be pinned to the correct version by volta.\n\n#### Steps:\n1. Install the dependencies *(at the root level)*. [Lerna](https://lerna.js.org/) will ensure the subdirectories’ packages are also installed.\n\n``` \nyarn\n```\n\n2. Export the environment variables *(at the root level)* after `.env.dev` has been configured.\n```\nexport $(grep -v ‘^#’ .env.dev | xargs)\n```\n\n3. Generate GraphQL and Prisma code *(in the server directory)*.\n*Note: make sure to generate them whenever changes have been made to the GraphQL schemas.*\n\n```\ncd server\nyarn generate\n```\n\n4. If using Docker, build the Docker images and containers *(at the root)*. If they're already available then issuing the following command would start the containers.\n*Note: if building the images and containers, this process can take an upwards of 20 minutes.*\n\n**If setting up Packrat without Docker, skip to step 9**\n\n```\ncd .. \nyarn dev\n```\n\n5. Once the Docker images and containers are built, they should start in 10s-20s. The client should be reachable at `http://localhost:3000` and server should be reachable at `http://localhost:4000`, or the ports specified in `.env.dev`.\n\n6. To follow debug logs for `client` or `server` container, run `yarn log:client` or `yarn log:server` *(at the root)*.\n\n7. To log in and use Packrat, the database must be first initialized with data and user info *(in the server directory)*.\n\n```\ncd server\nyarn initdbdock\n```\n\n8. After the database has been initialized, Solr enterprise-search needs to be indexed in order to populate the repository.\nNavigate to `localhost:4000/solrindex` in the browser and wait for the result to appear. Once Solr finishes indexing, set up via Docker is complete!\n\n*Note: sometimes a failure message will appear even upon successful indexing. Successful indexing can be seen in the server container logs and by visiting the repository and finding the newly populated entries.*\n\n9. If setting up Packrat without Docker, compile the typescript code in a separate terminal *(for the common directory)*.\n```\ncd common\nyarn start\n```\n\n10. Run each command in separate terminals *(at the root level)*:\n\n**For client:**\n\n``` \nyarn start:client\n``` \n\n**For server:**\n\n```\nyarn start:server\n``` \n\n11. Setting up Packrat without Docker gives users the flexbility to install and configure their own database and Solr caching as needed.\n\n\n**Congratulations, Packrat is now ready for use!**\n\n\n# Alternative docker workflow:\n\n```\n# If step 4 for building and starting the docker containers are failing, follow this alternative instead.\n# Creates Devbox for packrat\nyarn devbox:up\n# Creates DB for devbox\nyarn devbox:db\n# Creates SOLR for devbox\nyarn devbox:solr\n# Create and Connects devbox-db, devbox-solr, and devbox to the same network\nyarn devbox:network\n# Drops you into shell inside the image\nyarn devbox:start\n```\n\n*Note: if you get permission denied during the execution make sure to give it permission using:*\n```\nchmod 777 ./conf/scripts/devbox/*.sh\n```\n\n# Deployment instructions:\n*Note: Make sure before you execute any script, you're root of the repository `dpo-packrat` and if you get permission denied for any script, make sure to do `chmod 777 path/to/script`. If you encounter any error then make sure to checkout Packrat server setup instruction on confluence*\n\n## Docker images:\n*Note: current supported environments are `dev` and `prod`*\n\n1. Login into SI server\n\n2. Pull the latest changes\n```\ngit pull\n```\n*Note: repository is already cloned in `/home/\u003cuser\u003e/dpo-packrat`*\n\n3. Switch to the branch you want to deploy. To deploy for `dev` environment you should be on `develop` branch, for `prod` environment\n```\ngit checkout master\n```\n*Note: `.env.dev` and `.env.prod` are already available*\n\n4. Deploy using the `deploy.sh` script\n```\n./conf/scripts/deploy.sh prod\n```\nIf you get `permission denied for docker` then use\n```\nsudo chmod 777 /var/run/docker.sock\n```\nIf you get `Error while loading shared libraries: libz.so.1` for `docker-compose` then do the following:\n```\nsudo mount /tmp -o remount,exec\n```\n\n5. Wait for the images to be build/updated, then use `./conf/scripts/cleanup.sh` script to cleanup any residual docker images are left (optional)\n\n6. Make sure nginx is active using `sudo service nginx status --no-pager`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmithsonian%2Fdpo-packrat","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsmithsonian%2Fdpo-packrat","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsmithsonian%2Fdpo-packrat/lists"}