Skip to content

Commit bed5afd

Browse files
kayiwahackartisan
authored andcommitted
add devbox environment
1 parent 196abba commit bed5afd

File tree

4 files changed

+501
-11
lines changed

4 files changed

+501
-11
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,4 +60,6 @@ node_modules
6060
# Vite uses dotenv and suggests to ignore local-only env files. See
6161
# https://vitejs.dev/guide/env-and-mode.html#env-files
6262
*.local
63-
63+
# Devbox
64+
.devbox
65+
vendor/bundle/

README.md

Lines changed: 42 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,42 @@
11
# Pulfalight
2+
23
[![CircleCI](https://circleci.com/gh/pulibrary/pulfalight.svg?style=svg)](https://circleci.com/gh/pulibrary/pulfalight)
34
[![Coverage](https://img.shields.io/badge/coverage-100%25-brightgreen)](https://github.com/pulibrary/pulfalight)
45
[![Apache 2.0 License](https://img.shields.io/badge/license-Apache%202.0-blue.svg?style=plastic)](./LICENSE)
56

67
This is an implementation of ArcLight being implemented as a replacement for the
7-
Princeton University Finding Aids (PULFA) service. Accessible at https://findingaids.princeton.edu/.
8+
Princeton University Finding Aids (PULFA) service. Accessible at <https://findingaids.princeton.edu/>.
9+
10+
## Development
11+
12+
### Setup
13+
14+
Supports `asdf` (existing) and `devbox` for local language/tooling setup
15+
16+
#### Option A: Devbox
17+
18+
1. Install Devbox
19+
2. Enter the devbox shell:
20+
21+
```sh
22+
devbox shell
23+
```
824

9-
### Development
25+
3. Install dependencies:
1026

11-
#### Setup
12-
* Install Lando from https://github.com/lando/lando/releases (at least 3.0.0-rrc.2)
27+
```sh
28+
devbox run setup
29+
```
30+
31+
Services (Solr + database) are still managed via Lando (see below). Once Lando is installed, you can start services with:
32+
33+
```sh
34+
devbox run servers:start
35+
```
36+
37+
#### Option B: asdf
38+
39+
* Install Lando from <https://github.com/lando/lando/releases> (at least 3.0.0-rrc.2)
1340
* See .tool-versions for language version requirements (ruby, nodejs)
1441
* `bin/setup_keys`
1542

@@ -18,10 +45,11 @@ asdf install
1845
bundle install
1946
yarn install
2047
```
21-
(Remember you'll need to run the above commands on an ongoing basis as dependencies are updated.)
2248

49+
(Remember you'll need to run the above commands on an ongoing basis as dependencies are updated.)
2350

2451
#### Starting / stopping services
52+
2553
We use lando to run services required for both test and development
2654
environments.
2755

@@ -30,14 +58,17 @@ Start and initialize solr and database services with `rake servers:start`
3058
To stop solr and database services: `rake servers:stop` or `lando stop`
3159

3260
#### Run tests
61+
3362
`bundle exec rspec`
3463
To watch feature tests run in a browser, make sure chrome is installed and run: `RUN_IN_BROWSER=true rspec spec`
3564

3665
#### Start development server
37-
- `rails s`
38-
- Access Pulfalight at http://localhost:3000/
66+
67+
* `rails s`
68+
* Access Pulfalight at <http://localhost:3000/>
3969

4070
### Configuration
71+
4172
Please see [the ArcLight
4273
documentation](https://github.com/projectblacklight/arclight/wiki/Indexing-EAD-in-ArcLight#repository-configuration)
4374
for information regarding the configuration of repositories in ArcLight.
@@ -46,12 +77,12 @@ for information regarding the configuration of repositories in ArcLight.
4677

4778
#### Configuring ASpace
4879

49-
5080
1. `brew install lastpass-cli`
5181
2. `lpass login emailhere`
5282
3. `bundle exec rake setup_keys`
5383

5484
#### Index "Interesting" EADs
85+
5586
A sub-section of all our collections have been identified and can be queued up
5687
for ingest via:
5788

@@ -60,7 +91,8 @@ A sub-section of all our collections have been identified and can be queued up
6091
#### Index a specific EAD
6192

6293
In a rails console run the index job with a specific EAD, e.g.:
63-
```
94+
95+
```text
6496
AspaceIndexJob.perform_later(resource_descriptions_uri: "repositories/4/resource_descriptions/2203", repository_id: "univarchives")
6597
```
6698

@@ -88,7 +120,7 @@ Once the jobs are finished processing by sidekiq you'll need to either wait 5 mi
88120
A subset of collections (the same that are run in specs) can be indexed into
89121
development via `bundle exec rake pulfalight:seed`
90122

91-
#### Adding new EADs to test suite.
123+
#### Adding new EADs to test suite
92124

93125
1. Open up `app/services/aspace_fixture_generator.rb`
94126
1. Add EAD ID to the `AspaceFixtureGenerator::EAD_IDS` constant.

devbox.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{ "$schema": "https://raw.githubusercontent.com/jetify-com/devbox/main/.schema/devbox.schema.json", "packages": [ "ruby@3.4", "nodejs@22", "yarn@1.22.10", "pkg-config", "openssl", "zlib", "libyaml", "libffi", "readline", "gmp", "postgresql_16", "libxml2", "libxslt", "redis", "git@latest" ], "env": { "BUNDLE_WITHOUT": "production", "BUNDLE_JOBS": "4", "BUNDLE_RETRY": "3" }, "shell": { "init_hook": [ "bundle config set --local path 'vendor/bundle' >/dev/null 2>&1 || true" ], "scripts": { "setup": [ "bundle install", "yarn install" ], "test": [ "bundle exec rspec" ], "servers:start": [ "bundle exec rake servers:start" ], "servers:stop": [ "bundle exec rake servers:stop" ], "rails": [ "bundle exec rails s -b 0.0.0.0 -p ${PORT:-3000}" ], "console": [ "bundle exec rails c" ] } } }

0 commit comments

Comments
 (0)